Skip to content

Commit

Permalink
[TASK] Remove leftover Tx_Vhs_references
Browse files Browse the repository at this point in the history
All references outside of ext_localconf and ClassAliasMap should be removed now
  • Loading branch information
cedricziel committed Jun 7, 2014
1 parent 29e528b commit ec9b42a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
22 changes: 11 additions & 11 deletions Classes/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
*
* ### Examples:
*
* $asset = $this->objectManager->get('Tx_Vhs_Asset');
* $asset = $this->objectManager->get('FluidTYPO3\Vhs\Asset');
* // OR you can use the static factory method which works anywhere
* // including outside of Extbase.
* $asset = Tx_Vhs_Asset::getInstance();
* $asset = \FluidTYPO3\Vhs\Asset::getInstance();
* $asset->setPath('fileadmin/test.js')->setStandalone(TRUE)->finalize();
*
* Or simply:
*
* $this->objectManager->get('Tx_Vhs_Asset')->setPath('...')->finalize();
* $this->objectManager->get('FluidTYPO3\Vhs\Asset')->setPath('...')->finalize();
*
* And you can create clean instances:
*
Expand All @@ -51,14 +51,14 @@
* Or if you have all settings in an array (with members named according to
* the properties on this class:
*
* Tx_Vhs_Asset::createFromSettings($settings)->finalize();
* \FluidTYPO3\Vhs\Asset::createFromSettings($settings)->finalize();
*
* Finally, if your Asset is file based, VHS can perform a few detections to
* set initial attributes like standalone, external (if file contains protocol),
* type (based on extension) and name (base name of file).
*
* Tx_Vhs_Asset::createFromFile($filePathAndFilename);
* Tx_Vhs_Asset::createFromUrl($urlToExternalFile);
* \FluidTYPO3\Vhs\Asset::createFromFile($filePathAndFilename);
* \FluidTYPO3\Vhs\Asset::createFromUrl($urlToExternalFile);
*
* You can chain all setters on the class before finally calling finalize() to
* register the Asset (you can still modify the Asset afterwards, but an Asset
Expand All @@ -73,11 +73,11 @@
* @author Claus Due <claus@namelesscoder.net>
* @package Vhs
*/
use \FluidTYPO3\Vhs\ViewHelpers\Asset\AssetInterface;
use \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use \TYPO3\CMS\Core\Utility\GeneralUtility;
use \TYPO3\CMS\Core\Utility\ArrayUtility;
use \TYPO3\CMS\Extbase\Reflection\ObjectAccess;
use FluidTYPO3\Vhs\ViewHelpers\Asset\AssetInterface;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Reflection\ObjectAccess;

class Asset implements AssetInterface {

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ The following Fluid usage:
Is the exact same as ths PHP:

```
Tx_Vhs_Asset::createFromFile('fileadmin/demo.js');
\FluidTYPO3\Vhs\Asset::createFromFile('fileadmin/demo.js');
```

Which is a short form of:

```
Tx_Vhs_Asset::createFromSettings(array(
\FluidTYPO3\Vhs\Asset::createFromSettings(array(
'name' => 'demo',
'path' => 'fileadmin/demo.js'
));
Expand All @@ -71,9 +71,9 @@ Tx_Vhs_Asset::createFromSettings(array(
Which is itself a short form of:

```
$asset = Tx_Vhs_Asset::getInstance();
$asset = \FluidTYPO3\Vhs\Asset::getInstance();
// or alternatively, if this fits better in your other code:
$asset = $objectManager->get('Tx_Vhs_Asset');
$asset = $objectManager->get('FluidTYPO3\Vhs\Asset');
// then:
$asset->setName('demo');
$asset->setPath('fileadmin/demo.js');
Expand Down
22 changes: 11 additions & 11 deletions Tests/Unit/ViewHelpers/Variable/ConvertViewHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function convertObjectStorageToArray() {
* @test
*/
public function returnsEmptyStringForTypeStringAndValueNull() {
$viewHelper = $this->getAccessibleMock('Tx_Vhs_ViewHelpers_Var_ConvertViewHelper', array('renderChildren'));
$viewHelper = $this->getAccessibleMock('FluidTYPO3\Vhs\ViewHelpers\Variable\ConvertViewHelper', array('renderChildren'));
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(NULL));
$viewHelper->setArguments(array('type' => 'string'));
$converted = $viewHelper->render();
Expand All @@ -136,7 +136,7 @@ public function returnsEmptyStringForTypeStringAndValueNull() {
* @test
*/
public function returnsStringForTypeStringAndValueInteger() {
$viewHelper = $this->getAccessibleMock('Tx_Vhs_ViewHelpers_Var_ConvertViewHelper', array('renderChildren'));
$viewHelper = $this->getAccessibleMock('FluidTYPO3\Vhs\ViewHelpers\Variable\ConvertViewHelper', array('renderChildren'));
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(12345));
$viewHelper->setArguments(array('type' => 'string'));
$converted = $viewHelper->render();
Expand All @@ -147,7 +147,7 @@ public function returnsStringForTypeStringAndValueInteger() {
* @test
*/
public function returnsArrayForTypeArrayAndValueNull() {
$viewHelper = $this->getAccessibleMock('Tx_Vhs_ViewHelpers_Var_ConvertViewHelper', array('renderChildren'));
$viewHelper = $this->getAccessibleMock('FluidTYPO3\Vhs\ViewHelpers\Variable\ConvertViewHelper', array('renderChildren'));
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(NULL));
$viewHelper->setArguments(array('type' => 'array'));
$converted = $viewHelper->render();
Expand All @@ -158,7 +158,7 @@ public function returnsArrayForTypeArrayAndValueNull() {
* @test
*/
public function returnsArrayForTypeArrayAndValueString() {
$viewHelper = $this->getAccessibleMock('Tx_Vhs_ViewHelpers_Var_ConvertViewHelper', array('renderChildren'));
$viewHelper = $this->getAccessibleMock('FluidTYPO3\Vhs\ViewHelpers\Variable\ConvertViewHelper', array('renderChildren'));
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('foo'));
$viewHelper->setArguments(array('type' => 'array'));
$converted = $viewHelper->render();
Expand All @@ -170,7 +170,7 @@ public function returnsArrayForTypeArrayAndValueString() {
* @test
*/
public function returnsObjectStorageForTypeArrayAndValueNull() {
$viewHelper = $this->getAccessibleMock('Tx_Vhs_ViewHelpers_Var_ConvertViewHelper', array('renderChildren'));
$viewHelper = $this->getAccessibleMock('FluidTYPO3\Vhs\ViewHelpers\Variable\ConvertViewHelper', array('renderChildren'));
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(NULL));
$viewHelper->setArguments(array('type' => 'ObjectStorage'));
$converted = $viewHelper->render();
Expand All @@ -182,10 +182,10 @@ public function returnsObjectStorageForTypeArrayAndValueNull() {
* @test
*/
public function returnsArrayForTypeObjectStorage() {
$domainObject = $this->objectManager->get('Tx_Vhs_Tests_Fixtures_Domain_Model_Foo');
$domainObject = $this->objectManager->get('FluidTYPO3\Vhs\Tests\Fixtures\Domain\Model\Foo');
$storage = $this->objectManager->get('Tx_Extbase_Persistence_ObjectStorage');
$storage->attach($domainObject);
$viewHelper = $this->getAccessibleMock('Tx_Vhs_ViewHelpers_Var_ConvertViewHelper', array('renderChildren'));
$viewHelper = $this->getAccessibleMock('FluidTYPO3\Vhs\ViewHelpers\Variable\ConvertViewHelper', array('renderChildren'));
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue($storage));
$viewHelper->setArguments(array('type' => 'array'));
$converted = $viewHelper->render();
Expand All @@ -197,7 +197,7 @@ public function returnsArrayForTypeObjectStorage() {
* @test
*/
public function returnsBooleanForTypeBooleanAndValueNull() {
$viewHelper = $this->getAccessibleMock('Tx_Vhs_ViewHelpers_Var_ConvertViewHelper', array('renderChildren'));
$viewHelper = $this->getAccessibleMock('FluidTYPO3\Vhs\ViewHelpers\Variable\ConvertViewHelper', array('renderChildren'));
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(NULL));
$viewHelper->setArguments(array('type' => 'boolean'));
$converted = $viewHelper->render();
Expand All @@ -209,7 +209,7 @@ public function returnsBooleanForTypeBooleanAndValueNull() {
* @test
*/
public function returnsBooleanForTypeBooleanAndValueInteger() {
$viewHelper = $this->getAccessibleMock('Tx_Vhs_ViewHelpers_Var_ConvertViewHelper', array('renderChildren'));
$viewHelper = $this->getAccessibleMock('FluidTYPO3\Vhs\ViewHelpers\Variable\ConvertViewHelper', array('renderChildren'));
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(1));
$viewHelper->setArguments(array('type' => 'boolean'));
$converted = $viewHelper->render();
Expand All @@ -221,7 +221,7 @@ public function returnsBooleanForTypeBooleanAndValueInteger() {
* @test
*/
public function returnsBooleanForTypeBooleanAndValueString() {
$viewHelper = $this->getAccessibleMock('Tx_Vhs_ViewHelpers_Var_ConvertViewHelper', array('renderChildren'));
$viewHelper = $this->getAccessibleMock('FluidTYPO3\Vhs\ViewHelpers\Variable\ConvertViewHelper', array('renderChildren'));
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('foo'));
$viewHelper->setArguments(array('type' => 'boolean'));
$converted = $viewHelper->render();
Expand All @@ -233,7 +233,7 @@ public function returnsBooleanForTypeBooleanAndValueString() {
* @test
*/
public function returnsExpectedDefaultValue() {
$viewHelper = $this->getAccessibleMock('Tx_Vhs_ViewHelpers_Var_ConvertViewHelper', array('renderChildren'));
$viewHelper = $this->getAccessibleMock('FluidTYPO3\Vhs\ViewHelpers\Variable\ConvertViewHelper', array('renderChildren'));
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(NULL));
$viewHelper->setArguments(array('type' => 'boolean', 'default' => TRUE));
$converted = $viewHelper->render();
Expand Down

0 comments on commit ec9b42a

Please sign in to comment.