@@ -15,31 +15,31 @@ |
||
15 | 15 | { |
16 | 16 | $target = '\\Aimeos\\Controller\\Frontend\\Locale\\Iface'; |
17 | 17 | |
18 | - $controller = \Aimeos\Controller\Frontend\Locale\Factory::create( \TestHelperFrontend::getContext() ); |
|
19 | - $this->assertInstanceOf( $target, $controller ); |
|
18 | + $controller = \Aimeos\Controller\Frontend\Locale\Factory::create(\TestHelperFrontend::getContext()); |
|
19 | + $this->assertInstanceOf($target, $controller); |
|
20 | 20 | |
21 | - $controller = \Aimeos\Controller\Frontend\Locale\Factory::create( \TestHelperFrontend::getContext(), 'Standard' ); |
|
22 | - $this->assertInstanceOf( $target, $controller ); |
|
21 | + $controller = \Aimeos\Controller\Frontend\Locale\Factory::create(\TestHelperFrontend::getContext(), 'Standard'); |
|
22 | + $this->assertInstanceOf($target, $controller); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | |
26 | 26 | public function testCreateControllerInvalidImplementation() |
27 | 27 | { |
28 | - $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
29 | - \Aimeos\Controller\Frontend\Locale\Factory::create( \TestHelperFrontend::getContext(), 'Invalid' ); |
|
28 | + $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
29 | + \Aimeos\Controller\Frontend\Locale\Factory::create(\TestHelperFrontend::getContext(), 'Invalid'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | |
33 | 33 | public function testCreateControllerInvalidName() |
34 | 34 | { |
35 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
36 | - \Aimeos\Controller\Frontend\Locale\Factory::create( \TestHelperFrontend::getContext(), '%^' ); |
|
35 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
36 | + \Aimeos\Controller\Frontend\Locale\Factory::create(\TestHelperFrontend::getContext(), '%^'); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | |
40 | 40 | public function testCreateControllerNotExisting() |
41 | 41 | { |
42 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
43 | - \Aimeos\Controller\Frontend\Locale\Factory::create( \TestHelperFrontend::getContext(), 'notexist' ); |
|
42 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
43 | + \Aimeos\Controller\Frontend\Locale\Factory::create(\TestHelperFrontend::getContext(), 'notexist'); |
|
44 | 44 | } |
45 | 45 | } |
@@ -14,31 +14,31 @@ |
||
14 | 14 | { |
15 | 15 | $target = '\\Aimeos\\Controller\\Frontend\\Basket\\Iface'; |
16 | 16 | |
17 | - $controller = \Aimeos\Controller\Frontend\Basket\Factory::create( \TestHelperFrontend::getContext() ); |
|
18 | - $this->assertInstanceOf( $target, $controller ); |
|
17 | + $controller = \Aimeos\Controller\Frontend\Basket\Factory::create(\TestHelperFrontend::getContext()); |
|
18 | + $this->assertInstanceOf($target, $controller); |
|
19 | 19 | |
20 | - $controller = \Aimeos\Controller\Frontend\Basket\Factory::create( \TestHelperFrontend::getContext(), 'Standard' ); |
|
21 | - $this->assertInstanceOf( $target, $controller ); |
|
20 | + $controller = \Aimeos\Controller\Frontend\Basket\Factory::create(\TestHelperFrontend::getContext(), 'Standard'); |
|
21 | + $this->assertInstanceOf($target, $controller); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | |
25 | 25 | public function testCreateControllerInvalidImplementation() |
26 | 26 | { |
27 | - $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
28 | - \Aimeos\Controller\Frontend\Basket\Factory::create( \TestHelperFrontend::getContext(), 'Invalid' ); |
|
27 | + $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
28 | + \Aimeos\Controller\Frontend\Basket\Factory::create(\TestHelperFrontend::getContext(), 'Invalid'); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | |
32 | 32 | public function testCreateControllerInvalidName() |
33 | 33 | { |
34 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
35 | - \Aimeos\Controller\Frontend\Basket\Factory::create( \TestHelperFrontend::getContext(), '%^' ); |
|
34 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
35 | + \Aimeos\Controller\Frontend\Basket\Factory::create(\TestHelperFrontend::getContext(), '%^'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function testCreateControllerNotExisting() |
40 | 40 | { |
41 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
42 | - \Aimeos\Controller\Frontend\Basket\Factory::create( \TestHelperFrontend::getContext(), 'notexist' ); |
|
41 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
42 | + \Aimeos\Controller\Frontend\Basket\Factory::create(\TestHelperFrontend::getContext(), 'notexist'); |
|
43 | 43 | } |
44 | 44 | } |
@@ -14,31 +14,31 @@ |
||
14 | 14 | { |
15 | 15 | $target = '\\Aimeos\\Controller\\Frontend\\Catalog\\Iface'; |
16 | 16 | |
17 | - $controller = \Aimeos\Controller\Frontend\Catalog\Factory::create( \TestHelperFrontend::getContext() ); |
|
18 | - $this->assertInstanceOf( $target, $controller ); |
|
17 | + $controller = \Aimeos\Controller\Frontend\Catalog\Factory::create(\TestHelperFrontend::getContext()); |
|
18 | + $this->assertInstanceOf($target, $controller); |
|
19 | 19 | |
20 | - $controller = \Aimeos\Controller\Frontend\Catalog\Factory::create( \TestHelperFrontend::getContext(), 'Standard' ); |
|
21 | - $this->assertInstanceOf( $target, $controller ); |
|
20 | + $controller = \Aimeos\Controller\Frontend\Catalog\Factory::create(\TestHelperFrontend::getContext(), 'Standard'); |
|
21 | + $this->assertInstanceOf($target, $controller); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | |
25 | 25 | public function testCreateControllerInvalidImplementation() |
26 | 26 | { |
27 | - $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
28 | - \Aimeos\Controller\Frontend\Catalog\Factory::create( \TestHelperFrontend::getContext(), 'Invalid' ); |
|
27 | + $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
28 | + \Aimeos\Controller\Frontend\Catalog\Factory::create(\TestHelperFrontend::getContext(), 'Invalid'); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | |
32 | 32 | public function testCreateControllerInvalidName() |
33 | 33 | { |
34 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
35 | - \Aimeos\Controller\Frontend\Catalog\Factory::create( \TestHelperFrontend::getContext(), '%^' ); |
|
34 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
35 | + \Aimeos\Controller\Frontend\Catalog\Factory::create(\TestHelperFrontend::getContext(), '%^'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function testCreateControllerNotExisting() |
40 | 40 | { |
41 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
42 | - \Aimeos\Controller\Frontend\Catalog\Factory::create( \TestHelperFrontend::getContext(), 'notexist' ); |
|
41 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
42 | + \Aimeos\Controller\Frontend\Catalog\Factory::create(\TestHelperFrontend::getContext(), 'notexist'); |
|
43 | 43 | } |
44 | 44 | } |
@@ -14,92 +14,92 @@ |
||
14 | 14 | { |
15 | 15 | public function testCreateController() |
16 | 16 | { |
17 | - $controller = \Aimeos\Controller\Frontend\Factory::create( \TestHelperFrontend::getContext(), 'basket' ); |
|
18 | - $this->assertInstanceOf( '\\Aimeos\\Controller\\Frontend\\Iface', $controller ); |
|
17 | + $controller = \Aimeos\Controller\Frontend\Factory::create(\TestHelperFrontend::getContext(), 'basket'); |
|
18 | + $this->assertInstanceOf('\\Aimeos\\Controller\\Frontend\\Iface', $controller); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | |
22 | 22 | public function testCreateControllerEmpty() |
23 | 23 | { |
24 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
25 | - \Aimeos\Controller\Frontend\Factory::create( \TestHelperFrontend::getContext(), '' ); |
|
24 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
25 | + \Aimeos\Controller\Frontend\Factory::create(\TestHelperFrontend::getContext(), ''); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
29 | 29 | public function testCreateControllerInvalidName() |
30 | 30 | { |
31 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
32 | - \Aimeos\Controller\Frontend\Factory::create( \TestHelperFrontend::getContext(), '%^' ); |
|
31 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
32 | + \Aimeos\Controller\Frontend\Factory::create(\TestHelperFrontend::getContext(), '%^'); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | |
36 | 36 | public function testCreateControllerNotExisting() |
37 | 37 | { |
38 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
39 | - \Aimeos\Controller\Frontend\Factory::create( \TestHelperFrontend::getContext(), 'notexist' ); |
|
38 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
39 | + \Aimeos\Controller\Frontend\Factory::create(\TestHelperFrontend::getContext(), 'notexist'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | |
43 | 43 | public function testCreateSubControllerNotExisting() |
44 | 44 | { |
45 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
46 | - \Aimeos\Controller\Frontend\Factory::create( \TestHelperFrontend::getContext(), 'basket/notexist' ); |
|
45 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
46 | + \Aimeos\Controller\Frontend\Factory::create(\TestHelperFrontend::getContext(), 'basket/notexist'); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | |
50 | 50 | public function testClear() |
51 | 51 | { |
52 | - $cache = \Aimeos\Controller\Frontend\Factory::setCache( true ); |
|
52 | + $cache = \Aimeos\Controller\Frontend\Factory::setCache(true); |
|
53 | 53 | |
54 | 54 | $context = \TestHelperFrontend::getContext(); |
55 | 55 | |
56 | - $controller1 = \Aimeos\Controller\Frontend\Factory::create( $context, 'basket' ); |
|
56 | + $controller1 = \Aimeos\Controller\Frontend\Factory::create($context, 'basket'); |
|
57 | 57 | \Aimeos\Controller\Frontend\Factory::clear(); |
58 | - $controller2 = \Aimeos\Controller\Frontend\Factory::create( $context, 'basket' ); |
|
58 | + $controller2 = \Aimeos\Controller\Frontend\Factory::create($context, 'basket'); |
|
59 | 59 | |
60 | - \Aimeos\Controller\Frontend\Factory::setCache( $cache ); |
|
60 | + \Aimeos\Controller\Frontend\Factory::setCache($cache); |
|
61 | 61 | |
62 | - $this->assertNotSame( $controller1, $controller2 ); |
|
62 | + $this->assertNotSame($controller1, $controller2); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | |
66 | 66 | public function testClearSite() |
67 | 67 | { |
68 | - $cache = \Aimeos\Controller\Frontend\Factory::setCache( true ); |
|
68 | + $cache = \Aimeos\Controller\Frontend\Factory::setCache(true); |
|
69 | 69 | |
70 | 70 | $context = \TestHelperFrontend::getContext(); |
71 | 71 | |
72 | - $basket1 = \Aimeos\Controller\Frontend\Factory::create( $context, 'basket' ); |
|
73 | - $catalog1 = \Aimeos\Controller\Frontend\Factory::create( $context, 'catalog' ); |
|
74 | - \Aimeos\Controller\Frontend\Factory::clear( (string) $context ); |
|
72 | + $basket1 = \Aimeos\Controller\Frontend\Factory::create($context, 'basket'); |
|
73 | + $catalog1 = \Aimeos\Controller\Frontend\Factory::create($context, 'catalog'); |
|
74 | + \Aimeos\Controller\Frontend\Factory::clear((string) $context); |
|
75 | 75 | |
76 | - $basket2 = \Aimeos\Controller\Frontend\Factory::create( $context, 'basket' ); |
|
77 | - $catalog2 = \Aimeos\Controller\Frontend\Factory::create( $context, 'catalog' ); |
|
76 | + $basket2 = \Aimeos\Controller\Frontend\Factory::create($context, 'basket'); |
|
77 | + $catalog2 = \Aimeos\Controller\Frontend\Factory::create($context, 'catalog'); |
|
78 | 78 | |
79 | - \Aimeos\Controller\Frontend\Factory::setCache( $cache ); |
|
79 | + \Aimeos\Controller\Frontend\Factory::setCache($cache); |
|
80 | 80 | |
81 | - $this->assertNotSame( $basket1, $basket2 ); |
|
82 | - $this->assertNotSame( $catalog1, $catalog2 ); |
|
81 | + $this->assertNotSame($basket1, $basket2); |
|
82 | + $this->assertNotSame($catalog1, $catalog2); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | |
86 | 86 | public function testClearSpecific() |
87 | 87 | { |
88 | - $cache = \Aimeos\Controller\Frontend\Factory::setCache( true ); |
|
88 | + $cache = \Aimeos\Controller\Frontend\Factory::setCache(true); |
|
89 | 89 | |
90 | 90 | $context = \TestHelperFrontend::getContext(); |
91 | 91 | |
92 | - $basket1 = \Aimeos\Controller\Frontend\Factory::create( $context, 'basket' ); |
|
93 | - $catalog1 = \Aimeos\Controller\Frontend\Factory::create( $context, 'catalog' ); |
|
94 | - \Aimeos\Controller\Frontend\Factory::clear( (string) $context, 'basket' ); |
|
92 | + $basket1 = \Aimeos\Controller\Frontend\Factory::create($context, 'basket'); |
|
93 | + $catalog1 = \Aimeos\Controller\Frontend\Factory::create($context, 'catalog'); |
|
94 | + \Aimeos\Controller\Frontend\Factory::clear((string) $context, 'basket'); |
|
95 | 95 | |
96 | - $basket2 = \Aimeos\Controller\Frontend\Factory::create( $context, 'basket' ); |
|
97 | - $catalog2 = \Aimeos\Controller\Frontend\Factory::create( $context, 'catalog' ); |
|
96 | + $basket2 = \Aimeos\Controller\Frontend\Factory::create($context, 'basket'); |
|
97 | + $catalog2 = \Aimeos\Controller\Frontend\Factory::create($context, 'catalog'); |
|
98 | 98 | |
99 | - \Aimeos\Controller\Frontend\Factory::setCache( $cache ); |
|
99 | + \Aimeos\Controller\Frontend\Factory::setCache($cache); |
|
100 | 100 | |
101 | - $this->assertNotSame( $basket1, $basket2 ); |
|
102 | - $this->assertSame( $catalog1, $catalog2 ); |
|
101 | + $this->assertNotSame($basket1, $basket2); |
|
102 | + $this->assertSame($catalog1, $catalog2); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | } |
106 | 106 | \ No newline at end of file |
@@ -15,31 +15,31 @@ |
||
15 | 15 | { |
16 | 16 | $target = '\\Aimeos\\Controller\\Frontend\\Stock\\Iface'; |
17 | 17 | |
18 | - $controller = \Aimeos\Controller\Frontend\Stock\Factory::create( \TestHelperFrontend::getContext() ); |
|
19 | - $this->assertInstanceOf( $target, $controller ); |
|
18 | + $controller = \Aimeos\Controller\Frontend\Stock\Factory::create(\TestHelperFrontend::getContext()); |
|
19 | + $this->assertInstanceOf($target, $controller); |
|
20 | 20 | |
21 | - $controller = \Aimeos\Controller\Frontend\Stock\Factory::create( \TestHelperFrontend::getContext(), 'Standard' ); |
|
22 | - $this->assertInstanceOf( $target, $controller ); |
|
21 | + $controller = \Aimeos\Controller\Frontend\Stock\Factory::create(\TestHelperFrontend::getContext(), 'Standard'); |
|
22 | + $this->assertInstanceOf($target, $controller); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | |
26 | 26 | public function testCreateControllerInvalidImplementation() |
27 | 27 | { |
28 | - $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
29 | - \Aimeos\Controller\Frontend\Stock\Factory::create( \TestHelperFrontend::getContext(), 'Invalid' ); |
|
28 | + $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
29 | + \Aimeos\Controller\Frontend\Stock\Factory::create(\TestHelperFrontend::getContext(), 'Invalid'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | |
33 | 33 | public function testCreateControllerInvalidName() |
34 | 34 | { |
35 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
36 | - \Aimeos\Controller\Frontend\Stock\Factory::create( \TestHelperFrontend::getContext(), '%^' ); |
|
35 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
36 | + \Aimeos\Controller\Frontend\Stock\Factory::create(\TestHelperFrontend::getContext(), '%^'); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | |
40 | 40 | public function testCreateControllerNotExisting() |
41 | 41 | { |
42 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
43 | - \Aimeos\Controller\Frontend\Stock\Factory::create( \TestHelperFrontend::getContext(), 'notexist' ); |
|
42 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
43 | + \Aimeos\Controller\Frontend\Stock\Factory::create(\TestHelperFrontend::getContext(), 'notexist'); |
|
44 | 44 | } |
45 | 45 | } |
@@ -15,31 +15,31 @@ |
||
15 | 15 | { |
16 | 16 | $target = '\\Aimeos\\Controller\\Frontend\\Supplier\\Iface'; |
17 | 17 | |
18 | - $controller = \Aimeos\Controller\Frontend\Supplier\Factory::create( \TestHelperFrontend::getContext() ); |
|
19 | - $this->assertInstanceOf( $target, $controller ); |
|
18 | + $controller = \Aimeos\Controller\Frontend\Supplier\Factory::create(\TestHelperFrontend::getContext()); |
|
19 | + $this->assertInstanceOf($target, $controller); |
|
20 | 20 | |
21 | - $controller = \Aimeos\Controller\Frontend\Supplier\Factory::create( \TestHelperFrontend::getContext(), 'Standard' ); |
|
22 | - $this->assertInstanceOf( $target, $controller ); |
|
21 | + $controller = \Aimeos\Controller\Frontend\Supplier\Factory::create(\TestHelperFrontend::getContext(), 'Standard'); |
|
22 | + $this->assertInstanceOf($target, $controller); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | |
26 | 26 | public function testCreateControllerInvalidImplementation() |
27 | 27 | { |
28 | - $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
29 | - \Aimeos\Controller\Frontend\Supplier\Factory::create( \TestHelperFrontend::getContext(), 'Invalid' ); |
|
28 | + $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
29 | + \Aimeos\Controller\Frontend\Supplier\Factory::create(\TestHelperFrontend::getContext(), 'Invalid'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | |
33 | 33 | public function testCreateControllerInvalidName() |
34 | 34 | { |
35 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
36 | - \Aimeos\Controller\Frontend\Supplier\Factory::create( \TestHelperFrontend::getContext(), '%^' ); |
|
35 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
36 | + \Aimeos\Controller\Frontend\Supplier\Factory::create(\TestHelperFrontend::getContext(), '%^'); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | |
40 | 40 | public function testCreateControllerNotExisting() |
41 | 41 | { |
42 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
43 | - \Aimeos\Controller\Frontend\Supplier\Factory::create( \TestHelperFrontend::getContext(), 'notexist' ); |
|
42 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
43 | + \Aimeos\Controller\Frontend\Supplier\Factory::create(\TestHelperFrontend::getContext(), 'notexist'); |
|
44 | 44 | } |
45 | 45 | } |
@@ -15,31 +15,31 @@ |
||
15 | 15 | { |
16 | 16 | $target = '\\Aimeos\\Controller\\Frontend\\Attribute\\Iface'; |
17 | 17 | |
18 | - $controller = \Aimeos\Controller\Frontend\Attribute\Factory::create( \TestHelperFrontend::getContext() ); |
|
19 | - $this->assertInstanceOf( $target, $controller ); |
|
18 | + $controller = \Aimeos\Controller\Frontend\Attribute\Factory::create(\TestHelperFrontend::getContext()); |
|
19 | + $this->assertInstanceOf($target, $controller); |
|
20 | 20 | |
21 | - $controller = \Aimeos\Controller\Frontend\Attribute\Factory::create( \TestHelperFrontend::getContext(), 'Standard' ); |
|
22 | - $this->assertInstanceOf( $target, $controller ); |
|
21 | + $controller = \Aimeos\Controller\Frontend\Attribute\Factory::create(\TestHelperFrontend::getContext(), 'Standard'); |
|
22 | + $this->assertInstanceOf($target, $controller); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | |
26 | 26 | public function testCreateControllerInvalidImplementation() |
27 | 27 | { |
28 | - $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
29 | - \Aimeos\Controller\Frontend\Attribute\Factory::create( \TestHelperFrontend::getContext(), 'Invalid' ); |
|
28 | + $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
29 | + \Aimeos\Controller\Frontend\Attribute\Factory::create(\TestHelperFrontend::getContext(), 'Invalid'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | |
33 | 33 | public function testCreateControllerInvalidName() |
34 | 34 | { |
35 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
36 | - \Aimeos\Controller\Frontend\Attribute\Factory::create( \TestHelperFrontend::getContext(), '%^' ); |
|
35 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
36 | + \Aimeos\Controller\Frontend\Attribute\Factory::create(\TestHelperFrontend::getContext(), '%^'); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | |
40 | 40 | public function testCreateControllerNotExisting() |
41 | 41 | { |
42 | - $this->setExpectedException( '\\Aimeos\\Controller\\Frontend\\Exception' ); |
|
43 | - \Aimeos\Controller\Frontend\Attribute\Factory::create( \TestHelperFrontend::getContext(), 'notexist' ); |
|
42 | + $this->setExpectedException('\\Aimeos\\Controller\\Frontend\\Exception'); |
|
43 | + \Aimeos\Controller\Frontend\Attribute\Factory::create(\TestHelperFrontend::getContext(), 'notexist'); |
|
44 | 44 | } |
45 | 45 | } |
@@ -215,7 +215,6 @@ discard block |
||
215 | 215 | /** |
216 | 216 | * Sets the sorting of the product list |
217 | 217 | * |
218 | - * @param string|null $sort Sortation of the product list like "name", "-name", "price", "-price", "code", "-code", "ctime, "-ctime" and "relevance", null for no sortation |
|
219 | 218 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
220 | 219 | * @since 2019.04 |
221 | 220 | */ |
@@ -258,7 +257,7 @@ discard block |
||
258 | 257 | /** |
259 | 258 | * Returns the frontend controller |
260 | 259 | * |
261 | - * @return \Aimeos\Controller\Frontend\Product\Iface Frontend controller object |
|
260 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
262 | 261 | */ |
263 | 262 | protected function getController() |
264 | 263 | { |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | * @param \Aimeos\Controller\Frontend\Iface $controller Controller object |
31 | 31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
32 | 32 | */ |
33 | - public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ) |
|
33 | + public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context) |
|
34 | 34 | { |
35 | - \Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Product\\Iface', $controller ); |
|
35 | + \Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Product\\Iface', $controller); |
|
36 | 36 | |
37 | 37 | $this->controller = $controller; |
38 | 38 | |
39 | - parent::__construct( $context ); |
|
39 | + parent::__construct($context); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | * @return mixed Returns the value of the called method |
49 | 49 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
50 | 50 | */ |
51 | - public function __call( $name, array $param ) |
|
51 | + public function __call($name, array $param) |
|
52 | 52 | { |
53 | - return @call_user_func_array( array( $this->controller, $name ), $param ); |
|
53 | + return @call_user_func_array(array($this->controller, $name), $param); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | * @return array Associative list of key values as key and the product count for this key as value |
62 | 62 | * @since 2019.04 |
63 | 63 | */ |
64 | - public function aggregate( $key ) |
|
64 | + public function aggregate($key) |
|
65 | 65 | { |
66 | - return $this->controller->aggregate( $key ); |
|
66 | + return $this->controller->aggregate($key); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
75 | 75 | * @since 2019.04 |
76 | 76 | */ |
77 | - public function allOf( $attrIds ) |
|
77 | + public function allOf($attrIds) |
|
78 | 78 | { |
79 | - $this->controller->allOf( $attrIds ); |
|
79 | + $this->controller->allOf($attrIds); |
|
80 | 80 | return $this; |
81 | 81 | } |
82 | 82 | |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
91 | 91 | * @since 2019.04 |
92 | 92 | */ |
93 | - public function category( $catIds, $listtype = 'default', $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ) |
|
93 | + public function category($catIds, $listtype = 'default', $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE) |
|
94 | 94 | { |
95 | - $this->controller->category( $catIds, $listtype, $level ); |
|
95 | + $this->controller->category($catIds, $listtype, $level); |
|
96 | 96 | return $this; |
97 | 97 | } |
98 | 98 | |
@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
107 | 107 | * @since 2019.04 |
108 | 108 | */ |
109 | - public function compare( $operator, $key, $value ) |
|
109 | + public function compare($operator, $key, $value) |
|
110 | 110 | { |
111 | - $this->controller->compare( $operator, $key, $value ); |
|
111 | + $this->controller->compare($operator, $key, $value); |
|
112 | 112 | return $this; |
113 | 113 | } |
114 | 114 | |
@@ -121,9 +121,9 @@ discard block |
||
121 | 121 | * @return \Aimeos\MShop\Product\Item\Iface Product item including the referenced domains items |
122 | 122 | * @since 2019.04 |
123 | 123 | */ |
124 | - public function get( $id, $domains = ['media', 'price', 'text'] ) |
|
124 | + public function get($id, $domains = ['media', 'price', 'text']) |
|
125 | 125 | { |
126 | - return $this->controller->get( $id, $domains ); |
|
126 | + return $this->controller->get($id, $domains); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | |
@@ -135,9 +135,9 @@ discard block |
||
135 | 135 | * @return \Aimeos\MShop\Product\Item\Iface Product item including the referenced domains items |
136 | 136 | * @since 2019.04 |
137 | 137 | */ |
138 | - public function find( $code, $domains = ['media', 'price', 'text'] ) |
|
138 | + public function find($code, $domains = ['media', 'price', 'text']) |
|
139 | 139 | { |
140 | - return $this->controller->find( $code, $domains ); |
|
140 | + return $this->controller->find($code, $domains); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
149 | 149 | * @since 2019.04 |
150 | 150 | */ |
151 | - public function oneOf( $attrIds ) |
|
151 | + public function oneOf($attrIds) |
|
152 | 152 | { |
153 | - $this->controller->oneOf( $attrIds ); |
|
153 | + $this->controller->oneOf($attrIds); |
|
154 | 154 | return $this; |
155 | 155 | } |
156 | 156 | |
@@ -162,9 +162,9 @@ discard block |
||
162 | 162 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
163 | 163 | * @since 2019.04 |
164 | 164 | */ |
165 | - public function parse( array $conditions ) |
|
165 | + public function parse(array $conditions) |
|
166 | 166 | { |
167 | - $this->controller->parse( $conditions ); |
|
167 | + $this->controller->parse($conditions); |
|
168 | 168 | return $this; |
169 | 169 | } |
170 | 170 | |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
177 | 177 | * @since 2019.04 |
178 | 178 | */ |
179 | - public function product( $prodIds ) |
|
179 | + public function product($prodIds) |
|
180 | 180 | { |
181 | - $this->controller->product( $prodIds ); |
|
181 | + $this->controller->product($prodIds); |
|
182 | 182 | return $this; |
183 | 183 | } |
184 | 184 | |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | * @return array Ordered list of product items implementing \Aimeos\MShop\Product\Item\Iface |
192 | 192 | * @since 2019.04 |
193 | 193 | */ |
194 | - public function search( $domains = ['media', 'price', 'text'], &$total = null ) |
|
194 | + public function search($domains = ['media', 'price', 'text'], &$total = null) |
|
195 | 195 | { |
196 | - return $this->controller->search( $domains, $total ); |
|
196 | + return $this->controller->search($domains, $total); |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | |
@@ -205,9 +205,9 @@ discard block |
||
205 | 205 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
206 | 206 | * @since 2019.04 |
207 | 207 | */ |
208 | - public function slice( $start, $limit ) |
|
208 | + public function slice($start, $limit) |
|
209 | 209 | { |
210 | - $this->controller->slice( $start, $limit ); |
|
210 | + $this->controller->slice($start, $limit); |
|
211 | 211 | return $this; |
212 | 212 | } |
213 | 213 | |
@@ -219,9 +219,9 @@ discard block |
||
219 | 219 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
220 | 220 | * @since 2019.04 |
221 | 221 | */ |
222 | - public function sort( $key = null ) |
|
222 | + public function sort($key = null) |
|
223 | 223 | { |
224 | - $this->controller->sort( $key ); |
|
224 | + $this->controller->sort($key); |
|
225 | 225 | return $this; |
226 | 226 | } |
227 | 227 | |
@@ -234,9 +234,9 @@ discard block |
||
234 | 234 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
235 | 235 | * @since 2019.04 |
236 | 236 | */ |
237 | - public function supplier( $supIds, $listtype = 'default' ) |
|
237 | + public function supplier($supIds, $listtype = 'default') |
|
238 | 238 | { |
239 | - $this->controller->supplier( $supIds, $listtype ); |
|
239 | + $this->controller->supplier($supIds, $listtype); |
|
240 | 240 | return $this; |
241 | 241 | } |
242 | 242 | |
@@ -248,9 +248,9 @@ discard block |
||
248 | 248 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
249 | 249 | * @since 2019.04 |
250 | 250 | */ |
251 | - public function text( $text ) |
|
251 | + public function text($text) |
|
252 | 252 | { |
253 | - $this->controller->text( $text ); |
|
253 | + $this->controller->text($text); |
|
254 | 254 | return $this; |
255 | 255 | } |
256 | 256 |
@@ -129,7 +129,7 @@ |
||
129 | 129 | /** |
130 | 130 | * Sets the sorting of the product list |
131 | 131 | * |
132 | - * @param string|null $sort Sortation of the product list like "name", "-name", "price", "-price", "code", "-code", "ctime, "-ctime" and "relevance", null for no sortation |
|
132 | + * @param string $key |
|
133 | 133 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
134 | 134 | * @since 2019.04 |
135 | 135 | */ |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @return array Associative list of key values as key and the product count for this key as value |
27 | 27 | * @since 2019.04 |
28 | 28 | */ |
29 | - public function aggregate( $key ); |
|
29 | + public function aggregate($key); |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Adds attribute IDs for filtering where products must reference all IDs |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
36 | 36 | * @since 2019.04 |
37 | 37 | */ |
38 | - public function allOf( $attrIds ); |
|
38 | + public function allOf($attrIds); |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Adds catalog IDs for filtering |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
47 | 47 | * @since 2019.04 |
48 | 48 | */ |
49 | - public function category( $catIds, $listtype = 'default', $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ); |
|
49 | + public function category($catIds, $listtype = 'default', $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE); |
|
50 | 50 | |
51 | 51 | /** |
52 | 52 | * Adds generic condition for filtering products |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
58 | 58 | * @since 2019.04 |
59 | 59 | */ |
60 | - public function compare( $operator, $key, $value ); |
|
60 | + public function compare($operator, $key, $value); |
|
61 | 61 | |
62 | 62 | /** |
63 | 63 | * Returns the product for the given product ID |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @return \Aimeos\MShop\Product\Item\Iface Product item including the referenced domains items |
68 | 68 | * @since 2019.04 |
69 | 69 | */ |
70 | - public function get( $id, $domains = ['media', 'price', 'text'] ); |
|
70 | + public function get($id, $domains = ['media', 'price', 'text']); |
|
71 | 71 | |
72 | 72 | /** |
73 | 73 | * Returns the product for the given product code |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * @return \Aimeos\MShop\Product\Item\Iface Product item including the referenced domains items |
78 | 78 | * @since 2019.04 |
79 | 79 | */ |
80 | - public function find( $code, $domains = ['media', 'price', 'text'] ); |
|
80 | + public function find($code, $domains = ['media', 'price', 'text']); |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * Adds attribute IDs for filtering where products must reference at least one ID |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
87 | 87 | * @since 2019.04 |
88 | 88 | */ |
89 | - public function oneOf( $attrIds ); |
|
89 | + public function oneOf($attrIds); |
|
90 | 90 | |
91 | 91 | /** |
92 | 92 | * Parses the given array and adds the conditions to the list of conditions |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
96 | 96 | * @since 2019.04 |
97 | 97 | */ |
98 | - public function parse( array $conditions ); |
|
98 | + public function parse(array $conditions); |
|
99 | 99 | |
100 | 100 | /** |
101 | 101 | * Adds product IDs for filtering |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
105 | 105 | * @since 2019.04 |
106 | 106 | */ |
107 | - public function product( $prodIds ); |
|
107 | + public function product($prodIds); |
|
108 | 108 | |
109 | 109 | /** |
110 | 110 | * Returns the products filtered by the previously assigned conditions |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * @return array Ordered list of product items implementing \Aimeos\MShop\Product\Item\Iface |
115 | 115 | * @since 2019.04 |
116 | 116 | */ |
117 | - public function search( $domains = ['media', 'price', 'text'], &$total = null ); |
|
117 | + public function search($domains = ['media', 'price', 'text'], &$total = null); |
|
118 | 118 | |
119 | 119 | /** |
120 | 120 | * Sets the start value and the number of returned products for slicing the list of found products |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
125 | 125 | * @since 2019.04 |
126 | 126 | */ |
127 | - public function slice( $start, $limit ); |
|
127 | + public function slice($start, $limit); |
|
128 | 128 | |
129 | 129 | /** |
130 | 130 | * Sets the sorting of the product list |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
134 | 134 | * @since 2019.04 |
135 | 135 | */ |
136 | - public function sort( $key = null ); |
|
136 | + public function sort($key = null); |
|
137 | 137 | |
138 | 138 | /** |
139 | 139 | * Adds supplier IDs for filtering |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
144 | 144 | * @since 2019.04 |
145 | 145 | */ |
146 | - public function supplier( $supIds, $listtype = 'default' ); |
|
146 | + public function supplier($supIds, $listtype = 'default'); |
|
147 | 147 | |
148 | 148 | /** |
149 | 149 | * Adds input string for full text search |
@@ -152,5 +152,5 @@ discard block |
||
152 | 152 | * @return \Aimeos\Controller\Frontend\Product\Iface Product controller for fluent interface |
153 | 153 | * @since 2019.04 |
154 | 154 | */ |
155 | - public function text( $text ); |
|
155 | + public function text($text); |
|
156 | 156 | } |