本文整理匯總了PHP中TestHelper::getControllerPaths方法的典型用法代碼示例。如果您正苦於以下問題:PHP TestHelper::getControllerPaths方法的具體用法?PHP TestHelper::getControllerPaths怎麽用?PHP TestHelper::getControllerPaths使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TestHelper
的用法示例。
在下文中一共展示了TestHelper::getControllerPaths方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetControllers
public function testGetControllers()
{
$context = \TestHelper::getContext();
$aimeos = \TestHelper::getAimeos();
$list = \Aimeos\Controller\Jobs\Factory::getControllers($context, $aimeos, \TestHelper::getControllerPaths());
$this->assertGreaterThan(0, count($list));
foreach ($list as $key => $object) {
$this->assertInstanceOf('\\Aimeos\\Controller\\Jobs\\Iface', $object);
}
}
示例2: testGetControllers
public function testGetControllers()
{
$context = TestHelper::getContext();
$arcavias = TestHelper::getArcavias();
$list = Controller_Jobs_Factory::getControllers($context, $arcavias, TestHelper::getControllerPaths());
$this->assertGreaterThan(0, count($list));
foreach ($list as $key => $object) {
$this->assertInstanceOf('Controller_Jobs_Interface', $object);
}
}
示例3: testClearSpecific
public function testClearSpecific()
{
$cache = \Aimeos\Controller\Jsonapi\Factory::setCache(true);
$context = \TestHelper::getContext();
$templatePaths = \TestHelper::getControllerPaths();
$cntlA1 = \Aimeos\Controller\Jsonapi\Factory::createController($context, $templatePaths, 'attribute');
$cntlB1 = \Aimeos\Controller\Jsonapi\Factory::createController($context, $templatePaths, 'attribute/lists/type');
\Aimeos\Controller\Jsonapi\Factory::clear((string) $context, 'attribute');
$cntlA2 = \Aimeos\Controller\Jsonapi\Factory::createController($context, $templatePaths, 'attribute');
$cntlB2 = \Aimeos\Controller\Jsonapi\Factory::createController($context, $templatePaths, 'attribute/lists/type');
\Aimeos\Controller\Jsonapi\Factory::setCache($cache);
$this->assertNotSame($cntlA1, $cntlA2);
$this->assertSame($cntlB1, $cntlB2);
}
示例4: setUpBeforeClass
public static function setUpBeforeClass()
{
$cntlPaths = \TestHelper::getControllerPaths();
self::$object = new \Aimeos\Controller\ExtJS\JsonRpc(\TestHelper::getContext(), $cntlPaths);
}
示例5: setUpBeforeClass
public static function setUpBeforeClass()
{
$cntlPaths = TestHelper::getControllerPaths();
self::$_object = new Controller_ExtJS_JsonRpc(TestHelper::getContext(), $cntlPaths);
}
示例6: testGetInvalid
public function testGetInvalid()
{
$header = array();
$status = 500;
$templatePaths = \TestHelper::getControllerPaths();
$object = new \Aimeos\Controller\Jsonapi\Standard($this->context, $templatePaths, 'invalid');
$result = json_decode($object->get('', $header, $status), true);
$this->assertEquals(404, $status);
$this->assertEquals(1, count($header));
$this->assertEquals(1, count($result['errors']));
$this->assertArrayHasKey('title', $result['errors'][0]);
$this->assertArrayHasKey('detail', $result['errors'][0]);
$this->assertArrayNotHasKey('data', $result);
$this->assertArrayNotHasKey('indluded', $result);
}