本文整理匯總了PHP中TYPO3\CMS\Core\Tests\AccessibleObjectInterface::build方法的典型用法代碼示例。如果您正苦於以下問題:PHP AccessibleObjectInterface::build方法的具體用法?PHP AccessibleObjectInterface::build怎麽用?PHP AccessibleObjectInterface::build使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TYPO3\CMS\Core\Tests\AccessibleObjectInterface
的用法示例。
在下文中一共展示了AccessibleObjectInterface::build方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: booleanOptionsCanHaveOnlyCertainValuesIfTheValueIsAssignedWithoutEqualSign
/**
* @test
* @author Robert Lemke <robert@typo3.org>
*/
public function booleanOptionsCanHaveOnlyCertainValuesIfTheValueIsAssignedWithoutEqualSign()
{
$methodParameters = array('b1' => array('optional' => TRUE, 'type' => 'boolean'), 'b2' => array('optional' => TRUE, 'type' => 'boolean'), 'b3' => array('optional' => TRUE, 'type' => 'boolean'), 'b4' => array('optional' => TRUE, 'type' => 'boolean'), 'b5' => array('optional' => TRUE, 'type' => 'boolean'), 'b6' => array('optional' => TRUE, 'type' => 'boolean'));
$this->mockReflectionService->expects($this->once())->method('getMethodParameters')->with('Tx_SomeExtensionName_Command_DefaultCommandController', 'listCommand')->will($this->returnValue($methodParameters));
$expectedArguments = array('b1' => TRUE, 'b2' => TRUE, 'b3' => TRUE, 'b4' => FALSE, 'b5' => FALSE, 'b6' => FALSE);
$request = $this->requestBuilder->build('some_extension_name:default:list --b2 y --b1 1 --b3 true --b4 false --b5 n --b6 0');
$this->assertEquals($expectedArguments, $request->getArguments());
}
示例2: array
/**
* @test
*/
public function buildSetsDefaultActionNameIfSpecifiedActionIsNotAllowedAndCallDefaultActionIfActionCantBeResolvedIsSet()
{
$this->configuration['mvc']['callDefaultActionIfActionCantBeResolved'] = 1;
$this->injectDependencies();
$this->requestBuilder->_set('extensionService', $this->mockExtensionService);
$_GET = array('tx_myextension_pi1' => array('controller' => 'TheThirdController', 'action' => 'someInvalidAction'));
$this->mockRequest->expects($this->once())->method('setControllerName')->with('TheThirdController');
$this->mockRequest->expects($this->once())->method('setControllerActionName')->with('delete');
$this->requestBuilder->build();
}