1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0 |
5
|
|
|
* @copyright Aimeos (aimeos.org), 2020-2025 |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
|
9
|
|
|
namespace Aimeos\Client\Html\Catalog\Price; |
10
|
|
|
|
11
|
|
|
|
12
|
|
|
class StandardTest extends \PHPUnit\Framework\TestCase |
13
|
|
|
{ |
14
|
|
|
private $object; |
15
|
|
|
private $context; |
16
|
|
|
private $view; |
17
|
|
|
|
18
|
|
|
|
19
|
|
|
protected function setUp() : void |
20
|
|
|
{ |
21
|
|
|
\Aimeos\Controller\Frontend::cache( true ); |
22
|
|
|
\Aimeos\MShop::cache( true ); |
23
|
|
|
|
24
|
|
|
$this->view = \TestHelper::view(); |
25
|
|
|
$this->context = \TestHelper::context(); |
26
|
|
|
|
27
|
|
|
$this->object = new \Aimeos\Client\Html\Catalog\Price\Standard( $this->context ); |
28
|
|
|
$this->object->setView( $this->view ); |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
|
32
|
|
|
protected function tearDown() : void |
33
|
|
|
{ |
34
|
|
|
\Aimeos\Controller\Frontend::cache( false ); |
35
|
|
|
\Aimeos\MShop::cache( false ); |
36
|
|
|
|
37
|
|
|
unset( $this->object, $this->context, $this->view ); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
|
41
|
|
|
public function testBody() |
42
|
|
|
{ |
43
|
|
|
$this->object->setView( $this->object->data( $this->view ) ); |
44
|
|
|
$output = $this->object->body(); |
45
|
|
|
|
46
|
|
|
$this->assertStringContainsString( '<div class="section aimeos catalog-filter"', $output ); |
47
|
|
|
$this->assertStringContainsString( '<div class="section catalog-filter-price', $output ); |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
|
51
|
|
|
public function testGetSubClient() |
52
|
|
|
{ |
53
|
|
|
$client = $this->object->getSubClient( 'price', 'Standard' ); |
54
|
|
|
$this->assertInstanceOf( '\\Aimeos\\Client\\HTML\\Iface', $client ); |
55
|
|
|
} |
56
|
|
|
} |
57
|
|
|
|