43 $this->request = $this->
getAccessibleMock(
'TYPO3\CMS\Extbase\Mvc\Cli\Request', array(
'dummy'));
44 $this->mockObjectManager = $this->getMock(
'TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
45 $this->request->_set(
'objectManager', $this->mockObjectManager);
53 $this->request->setControllerObjectName(
'Tx_Extbase_Command_CacheCommandController');
54 $this->request->setControllerCommandName(
'flush');
55 $this->mockObjectManager->expects($this->once())->method(
'get')->with(
'TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command',
'Tx_Extbase_Command_CacheCommandController',
'flush');
56 $this->request->getCommand();
64 $this->request->setControllerObjectName(
'Tx_Extbase_Command_CacheCommandController');
65 $this->request->setControllerCommandName(
'flush');
66 $this->request->getCommand();
67 $this->request->setControllerObjectName(
'Tx_SomeExtension_Command_BeerCommandController');
68 $this->request->setControllerCommandName(
'drink');
69 $this->mockObjectManager->expects($this->once())->method(
'get')->with(
'TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Command',
'Tx_SomeExtension_Command_BeerCommandController',
'drink');
70 $this->request->getCommand();
77 $mockCliRequest = new \TYPO3\CMS\Extbase\Mvc\Cli\Request;
78 $mockCliRequest->setControllerObjectName(
'TYPO3\CMS\Extbase\Command\NamespacedMockCommandController');
80 $this->assertSame(
'Extbase', $mockCliRequest->getControllerExtensionName());
87 $mockCliRequest = new \TYPO3\CMS\Extbase\Mvc\Cli\Request;
88 $mockCliRequest->setControllerObjectName(
'Tx_Extbase_Command_OldschoolMockCommandController');
90 $this->assertSame(
'Extbase', $mockCliRequest->getControllerExtensionName());
setControllerObjectNameProperlyResolvesExtensionNameWithNamespaces()
setControllerObjectNameAndSetControllerCommandNameUnsetTheBuiltCommandObject()
getAccessibleMock( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
setControllerObjectNameProperlyResolvesExtensionNameWithoutNamespaces()
getCommandReturnsTheCommandObjectReflectingTheRequestInformation()