|
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\MW\View\Helper\Jincluded; |
|
10
|
|
|
|
|
11
|
|
|
|
|
12
|
|
|
class StandardTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
|
|
13
|
|
|
{ |
|
14
|
|
|
private $object; |
|
15
|
|
|
|
|
16
|
|
|
|
|
17
|
|
|
protected function setUp() |
|
18
|
|
|
{ |
|
19
|
|
|
$this->object = new \Aimeos\MW\View\Helper\Jincluded\Standard( new \Aimeos\MW\View\Standard() ); |
|
20
|
|
|
} |
|
21
|
|
|
|
|
22
|
|
|
|
|
23
|
|
|
protected function tearDown() |
|
24
|
|
|
{ |
|
25
|
|
|
unset( $this->object ); |
|
26
|
|
|
} |
|
27
|
|
|
|
|
28
|
|
|
|
|
29
|
|
|
public function testTransformCatalog() |
|
30
|
|
|
{ |
|
31
|
|
|
$manager = \Aimeos\MShop::create( \TestHelperCustom::getContext(), 'catalog' ); |
|
32
|
|
|
$tree = $manager->getTree( $manager->findItem( 'group' )->getId(), ['media', 'text'] ); |
|
33
|
|
|
|
|
34
|
|
|
$this->assertEquals( 13, count( $this->object->transform( $tree, [] ) ) ); |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
|
|
38
|
|
|
public function testTransformCustomer() |
|
39
|
|
|
{ |
|
40
|
|
|
$domains = ['customer/address', 'customer/property']; |
|
41
|
|
|
$item = \Aimeos\MShop::create( \TestHelperCustom::getContext(), 'customer' )->findItem( 'UTC001', $domains ); |
|
42
|
|
|
|
|
43
|
|
|
$this->assertEquals( 2, count( $this->object->transform( $item, [] ) ) ); |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
|
|
47
|
|
|
public function testTransformProduct() |
|
48
|
|
|
{ |
|
49
|
|
|
$domains = ['attribute', 'media', 'price', 'product', 'product/property', 'text']; |
|
50
|
|
|
$item = \Aimeos\MShop::create( \TestHelperCustom::getContext(), 'product' )->findItem( 'CNE', $domains ); |
|
51
|
|
|
|
|
52
|
|
|
$this->assertGreaterThanOrEqual( 66, count( $this->object->transform( $item, [] ) ) ); |
|
53
|
|
|
} |
|
54
|
|
|
} |
|
55
|
|
|
|
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