|
@@ 81-99 (lines=19) @@
|
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
|
| 81 |
|
public function testClearSite() |
| 82 |
|
{ |
| 83 |
|
$cache = \Aimeos\Admin\JsonAdm\Factory::setCache( true ); |
| 84 |
|
|
| 85 |
|
$context = \TestHelperJadm::getContext(); |
| 86 |
|
$templatePaths = \TestHelperJadm::getJsonadmPaths(); |
| 87 |
|
|
| 88 |
|
$cntlA1 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, 'order' ); |
| 89 |
|
$cntlB1 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, 'order/base' ); |
| 90 |
|
\Aimeos\Admin\JsonAdm\Factory::clear( (string) $context ); |
| 91 |
|
|
| 92 |
|
$cntlA2 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, 'order' ); |
| 93 |
|
$cntlB2 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, 'order/base' ); |
| 94 |
|
|
| 95 |
|
\Aimeos\Admin\JsonAdm\Factory::setCache( $cache ); |
| 96 |
|
|
| 97 |
|
$this->assertNotSame( $cntlA1, $cntlA2 ); |
| 98 |
|
$this->assertNotSame( $cntlB1, $cntlB2 ); |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
|
| 102 |
|
public function testClearSpecific() |
|
@@ 102-121 (lines=20) @@
|
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
|
| 102 |
|
public function testClearSpecific() |
| 103 |
|
{ |
| 104 |
|
$cache = \Aimeos\Admin\JsonAdm\Factory::setCache( true ); |
| 105 |
|
|
| 106 |
|
$context = \TestHelperJadm::getContext(); |
| 107 |
|
$templatePaths = \TestHelperJadm::getJsonadmPaths(); |
| 108 |
|
|
| 109 |
|
$cntlA1 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, 'order' ); |
| 110 |
|
$cntlB1 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, 'order/base' ); |
| 111 |
|
|
| 112 |
|
\Aimeos\Admin\JsonAdm\Factory::clear( (string) $context, 'order' ); |
| 113 |
|
|
| 114 |
|
$cntlA2 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, 'order' ); |
| 115 |
|
$cntlB2 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, 'order/base' ); |
| 116 |
|
|
| 117 |
|
\Aimeos\Admin\JsonAdm\Factory::setCache( $cache ); |
| 118 |
|
|
| 119 |
|
$this->assertNotSame( $cntlA1, $cntlA2 ); |
| 120 |
|
$this->assertSame( $cntlB1, $cntlB2 ); |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
} |