Total Complexity | 5 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class StandardTest extends \PHPUnit\Framework\TestCase |
||
13 | { |
||
14 | private $object; |
||
15 | private $context; |
||
16 | |||
17 | |||
18 | protected function setUp() : void |
||
19 | { |
||
20 | $this->context = \TestHelperHtml::getContext(); |
||
21 | |||
22 | $customer = \Aimeos\MShop\Customer\Manager\Factory::create( $this->context )->find( '[email protected]' ); |
||
23 | $this->context->setUserId( $customer->getId() ); |
||
24 | |||
25 | $this->object = new \Aimeos\Client\Html\Account\Review\Todo\Standard( $this->context ); |
||
26 | $this->object->setView( \TestHelperHtml::getView() ); |
||
27 | } |
||
28 | |||
29 | |||
30 | protected function tearDown() : void |
||
31 | { |
||
32 | unset( $this->object, $this->context ); |
||
33 | } |
||
34 | |||
35 | |||
36 | public function testGetBody() |
||
37 | { |
||
38 | $view = \TestHelperHtml::getView(); |
||
39 | $this->object->setView( $this->object->addData( $view ) ); |
||
40 | |||
41 | $output = $this->object->getBody(); |
||
42 | |||
43 | $this->assertStringContainsString( '<section class="account-review-todo">', $output ); |
||
44 | } |
||
45 | |||
46 | |||
47 | public function testGetSubClientInvalid() |
||
48 | { |
||
49 | $this->expectException( '\\Aimeos\\Client\\Html\\Exception' ); |
||
50 | $this->object->getSubClient( 'invalid', 'invalid' ); |
||
51 | } |
||
52 | |||
53 | |||
54 | public function testGetSubClientInvalidName() |
||
58 | } |
||
59 | } |
||
60 |