|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0 |
|
5
|
|
|
* @copyright Aimeos (aimeos.org), 2019 |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
|
|
9
|
|
|
namespace Aimeos\Client\Html\Catalog\Detail\Supplier; |
|
10
|
|
|
|
|
11
|
|
|
|
|
12
|
|
|
class StandardTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
|
|
13
|
|
|
{ |
|
14
|
|
|
private $object; |
|
15
|
|
|
|
|
16
|
|
|
|
|
17
|
|
|
protected function setUp() |
|
18
|
|
|
{ |
|
19
|
|
|
$this->context = \TestHelperHtml::getContext(); |
|
|
|
|
|
|
20
|
|
|
$paths = \TestHelperHtml::getHtmlTemplatePaths(); |
|
21
|
|
|
|
|
22
|
|
|
$this->object = new \Aimeos\Client\Html\Catalog\Detail\Supplier\Standard( $this->context, $paths ); |
|
|
|
|
|
|
23
|
|
|
$this->object->setView( \TestHelperHtml::getView() ); |
|
24
|
|
|
} |
|
25
|
|
|
|
|
26
|
|
|
|
|
27
|
|
|
protected function tearDown() |
|
28
|
|
|
{ |
|
29
|
|
|
unset( $this->object, $this->context ); |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
|
|
33
|
|
|
public function testGetBody() |
|
34
|
|
|
{ |
|
35
|
|
|
$tags = []; |
|
36
|
|
|
$expire = null; |
|
37
|
|
|
$view = $this->object->getView(); |
|
38
|
|
|
$view->detailProductItem = \Aimeos\MShop::create( $this->context, 'product' )->findItem( 'CNC' ); |
|
39
|
|
|
|
|
40
|
|
|
$this->object->setView( $this->object->addData( $view, $tags, $expire ) ); |
|
41
|
|
|
$output = $this->object->getBody(); |
|
42
|
|
|
|
|
43
|
|
|
$this->assertEquals( '', $output ); |
|
44
|
|
|
$this->assertEquals( '2098-01-01 00:00:00', $expire ); |
|
45
|
|
|
$this->assertEquals( 3, count( $tags ) ); |
|
46
|
|
|
|
|
47
|
|
|
$rendered = $view->block()->get( 'catalog/detail/supplier' ); |
|
48
|
|
|
$this->assertStringStartsWith( '<div class="catalog-detail-supplier', $rendered ); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function testGetSubClient() |
|
52
|
|
|
{ |
|
53
|
|
|
$this->setExpectedException( '\\Aimeos\\Client\\Html\\Exception' ); |
|
54
|
|
|
$this->object->getSubClient( 'invalid', 'invalid' ); |
|
55
|
|
|
} |
|
56
|
|
|
} |
|
57
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths