@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | $context = \TestHelperJadm::getContext(); |
17 | 17 | $aimeos = \TestHelperJadm::getAimeos(); |
18 | 18 | |
19 | - $client = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order' ); |
|
20 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JsonAdm\\Common\\Iface', $client ); |
|
21 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JsonAdm\\Order\\Standard', $client ); |
|
19 | + $client = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order'); |
|
20 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JsonAdm\\Common\\Iface', $client); |
|
21 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JsonAdm\\Order\\Standard', $client); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | $context = \TestHelperJadm::getContext(); |
28 | 28 | $aimeos = \TestHelperJadm::getAimeos(); |
29 | 29 | |
30 | - $client = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order/base' ); |
|
31 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JsonAdm\\Common\\Iface', $client ); |
|
32 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JsonAdm\\Order\\Base\\Standard', $client ); |
|
30 | + $client = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order/base'); |
|
31 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JsonAdm\\Common\\Iface', $client); |
|
32 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JsonAdm\\Order\\Base\\Standard', $client); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | $context = \TestHelperJadm::getContext(); |
39 | 39 | $aimeos = \TestHelperJadm::getAimeos(); |
40 | 40 | |
41 | - $client = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'stock/type' ); |
|
42 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JsonAdm\\Common\\Iface', $client ); |
|
43 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JsonAdm\\Standard', $client ); |
|
41 | + $client = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'stock/type'); |
|
42 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JsonAdm\\Common\\Iface', $client); |
|
43 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JsonAdm\\Standard', $client); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | $context = \TestHelperJadm::getContext(); |
50 | 50 | $aimeos = \TestHelperJadm::getAimeos(); |
51 | 51 | |
52 | - $client = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, '' ); |
|
53 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JsonAdm\\Common\\Iface', $client ); |
|
54 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JsonAdm\\Standard', $client ); |
|
52 | + $client = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, ''); |
|
53 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JsonAdm\\Common\\Iface', $client); |
|
54 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JsonAdm\\Standard', $client); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | $context = \TestHelperJadm::getContext(); |
61 | 61 | $aimeos = \TestHelperJadm::getAimeos(); |
62 | 62 | |
63 | - $this->setExpectedException( '\\Aimeos\\Admin\\JsonAdm\\Exception' ); |
|
64 | - \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, '%^' ); |
|
63 | + $this->setExpectedException('\\Aimeos\\Admin\\JsonAdm\\Exception'); |
|
64 | + \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, '%^'); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | |
@@ -70,68 +70,68 @@ discard block |
||
70 | 70 | $context = \TestHelperJadm::getContext(); |
71 | 71 | $aimeos = \TestHelperJadm::getAimeos(); |
72 | 72 | |
73 | - $this->setExpectedException( '\\Aimeos\\Admin\\JsonAdm\\Exception' ); |
|
74 | - \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, '', '%^' ); |
|
73 | + $this->setExpectedException('\\Aimeos\\Admin\\JsonAdm\\Exception'); |
|
74 | + \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, '', '%^'); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | |
78 | 78 | public function testClear() |
79 | 79 | { |
80 | - $cache = \Aimeos\Admin\JsonAdm\Factory::setCache( true ); |
|
80 | + $cache = \Aimeos\Admin\JsonAdm\Factory::setCache(true); |
|
81 | 81 | |
82 | 82 | $context = \TestHelperJadm::getContext(); |
83 | 83 | $aimeos = \TestHelperJadm::getAimeos(); |
84 | 84 | |
85 | - $client1 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order' ); |
|
85 | + $client1 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order'); |
|
86 | 86 | \Aimeos\Admin\JsonAdm\Factory::clear(); |
87 | - $client2 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order' ); |
|
87 | + $client2 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order'); |
|
88 | 88 | |
89 | - \Aimeos\Admin\JsonAdm\Factory::setCache( $cache ); |
|
89 | + \Aimeos\Admin\JsonAdm\Factory::setCache($cache); |
|
90 | 90 | |
91 | - $this->assertNotSame( $client1, $client2 ); |
|
91 | + $this->assertNotSame($client1, $client2); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | |
95 | 95 | public function testClearSite() |
96 | 96 | { |
97 | - $cache = \Aimeos\Admin\JsonAdm\Factory::setCache( true ); |
|
97 | + $cache = \Aimeos\Admin\JsonAdm\Factory::setCache(true); |
|
98 | 98 | |
99 | 99 | $context = \TestHelperJadm::getContext(); |
100 | 100 | $aimeos = \TestHelperJadm::getAimeos(); |
101 | 101 | |
102 | - $cntlA1 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order' ); |
|
103 | - $cntlB1 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order/base' ); |
|
104 | - \Aimeos\Admin\JsonAdm\Factory::clear( (string) $context ); |
|
102 | + $cntlA1 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order'); |
|
103 | + $cntlB1 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order/base'); |
|
104 | + \Aimeos\Admin\JsonAdm\Factory::clear((string) $context); |
|
105 | 105 | |
106 | - $cntlA2 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order' ); |
|
107 | - $cntlB2 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order/base' ); |
|
106 | + $cntlA2 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order'); |
|
107 | + $cntlB2 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order/base'); |
|
108 | 108 | |
109 | - \Aimeos\Admin\JsonAdm\Factory::setCache( $cache ); |
|
109 | + \Aimeos\Admin\JsonAdm\Factory::setCache($cache); |
|
110 | 110 | |
111 | - $this->assertNotSame( $cntlA1, $cntlA2 ); |
|
112 | - $this->assertNotSame( $cntlB1, $cntlB2 ); |
|
111 | + $this->assertNotSame($cntlA1, $cntlA2); |
|
112 | + $this->assertNotSame($cntlB1, $cntlB2); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | |
116 | 116 | public function testClearSpecific() |
117 | 117 | { |
118 | - $cache = \Aimeos\Admin\JsonAdm\Factory::setCache( true ); |
|
118 | + $cache = \Aimeos\Admin\JsonAdm\Factory::setCache(true); |
|
119 | 119 | |
120 | 120 | $context = \TestHelperJadm::getContext(); |
121 | 121 | $aimeos = \TestHelperJadm::getAimeos(); |
122 | 122 | |
123 | - $cntlA1 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order' ); |
|
124 | - $cntlB1 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order/base' ); |
|
123 | + $cntlA1 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order'); |
|
124 | + $cntlB1 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order/base'); |
|
125 | 125 | |
126 | - \Aimeos\Admin\JsonAdm\Factory::clear( (string) $context, 'order' ); |
|
126 | + \Aimeos\Admin\JsonAdm\Factory::clear((string) $context, 'order'); |
|
127 | 127 | |
128 | - $cntlA2 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order' ); |
|
129 | - $cntlB2 = \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $aimeos, 'order/base' ); |
|
128 | + $cntlA2 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order'); |
|
129 | + $cntlB2 = \Aimeos\Admin\JsonAdm\Factory::createClient($context, $aimeos, 'order/base'); |
|
130 | 130 | |
131 | - \Aimeos\Admin\JsonAdm\Factory::setCache( $cache ); |
|
131 | + \Aimeos\Admin\JsonAdm\Factory::setCache($cache); |
|
132 | 132 | |
133 | - $this->assertNotSame( $cntlA1, $cntlA2 ); |
|
134 | - $this->assertSame( $cntlB1, $cntlB2 ); |
|
133 | + $this->assertNotSame($cntlA1, $cntlA2); |
|
134 | + $this->assertSame($cntlB1, $cntlB2); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | } |
138 | 138 | \ No newline at end of file |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | $this->context = \TestHelperJadm::getContext(); |
22 | 22 | $this->view = $this->context->getView(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Admin\JsonAdm\Attribute\Standard( $this->context, 'attribute' ); |
|
25 | - $this->object->setAimeos( \TestHelperJadm::getAimeos() ); |
|
26 | - $this->object->setView( $this->view ); |
|
24 | + $this->object = new \Aimeos\Admin\JsonAdm\Attribute\Standard($this->context, 'attribute'); |
|
25 | + $this->object->setAimeos(\TestHelperJadm::getAimeos()); |
|
26 | + $this->object->setView($this->view); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
@@ -31,26 +31,26 @@ discard block |
||
31 | 31 | { |
32 | 32 | $params = array( |
33 | 33 | 'filter' => array( |
34 | - '==' => array( 'attribute.code' => 's' ) |
|
34 | + '==' => array('attribute.code' => 's') |
|
35 | 35 | ), |
36 | 36 | 'include' => 'text' |
37 | 37 | ); |
38 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
39 | - $this->view->addHelper( 'param', $helper ); |
|
38 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
39 | + $this->view->addHelper('param', $helper); |
|
40 | 40 | |
41 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
42 | - $result = json_decode( (string) $response->getBody(), true ); |
|
41 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
42 | + $result = json_decode((string) $response->getBody(), true); |
|
43 | 43 | |
44 | 44 | |
45 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
46 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
45 | + $this->assertEquals(200, $response->getStatusCode()); |
|
46 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
47 | 47 | |
48 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
49 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
50 | - $this->assertEquals( 'attribute', $result['data'][0]['type'] ); |
|
51 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['text'] ) ); |
|
52 | - $this->assertEquals( 1, count( $result['included'] ) ); |
|
48 | + $this->assertEquals(1, $result['meta']['total']); |
|
49 | + $this->assertEquals(1, count($result['data'])); |
|
50 | + $this->assertEquals('attribute', $result['data'][0]['type']); |
|
51 | + $this->assertEquals(1, count($result['data'][0]['relationships']['text'])); |
|
52 | + $this->assertEquals(1, count($result['included'])); |
|
53 | 53 | |
54 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
54 | + $this->assertArrayNotHasKey('errors', $result); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | \ No newline at end of file |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | $this->context = \TestHelperJadm::getContext(); |
22 | 22 | $this->view = $this->context->getView(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Admin\JsonAdm\Text\Standard( $this->context, 'text' ); |
|
25 | - $this->object->setAimeos( \TestHelperJadm::getAimeos() ); |
|
26 | - $this->object->setView( $this->view ); |
|
24 | + $this->object = new \Aimeos\Admin\JsonAdm\Text\Standard($this->context, 'text'); |
|
25 | + $this->object->setAimeos(\TestHelperJadm::getAimeos()); |
|
26 | + $this->object->setView($this->view); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
@@ -31,26 +31,26 @@ discard block |
||
31 | 31 | { |
32 | 32 | $params = array( |
33 | 33 | 'filter' => array( |
34 | - '==' => array( 'text.label' => 'misc_long_desc' ) |
|
34 | + '==' => array('text.label' => 'misc_long_desc') |
|
35 | 35 | ), |
36 | 36 | 'include' => 'media' |
37 | 37 | ); |
38 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
39 | - $this->view->addHelper( 'param', $helper ); |
|
38 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
39 | + $this->view->addHelper('param', $helper); |
|
40 | 40 | |
41 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
42 | - $result = json_decode( (string) $response->getBody(), true ); |
|
41 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
42 | + $result = json_decode((string) $response->getBody(), true); |
|
43 | 43 | |
44 | 44 | |
45 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
46 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
45 | + $this->assertEquals(200, $response->getStatusCode()); |
|
46 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
47 | 47 | |
48 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
49 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
50 | - $this->assertEquals( 'text', $result['data'][0]['type'] ); |
|
51 | - $this->assertEquals( 4, count( $result['data'][0]['relationships']['media'] ) ); |
|
52 | - $this->assertEquals( 4, count( $result['included'] ) ); |
|
48 | + $this->assertEquals(1, $result['meta']['total']); |
|
49 | + $this->assertEquals(1, count($result['data'])); |
|
50 | + $this->assertEquals('text', $result['data'][0]['type']); |
|
51 | + $this->assertEquals(4, count($result['data'][0]['relationships']['media'])); |
|
52 | + $this->assertEquals(4, count($result['included'])); |
|
53 | 53 | |
54 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
54 | + $this->assertArrayNotHasKey('errors', $result); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | \ No newline at end of file |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | $this->context = \TestHelperJadm::getContext(); |
22 | 22 | $this->view = $this->context->getView(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Admin\JsonAdm\Coupon\Config\Standard( $this->context, 'coupon/config' ); |
|
25 | - $this->object->setAimeos( \TestHelperJadm::getAimeos() ); |
|
26 | - $this->object->setView( $this->view ); |
|
24 | + $this->object = new \Aimeos\Admin\JsonAdm\Coupon\Config\Standard($this->context, 'coupon/config'); |
|
25 | + $this->object->setAimeos(\TestHelperJadm::getAimeos()); |
|
26 | + $this->object->setView($this->view); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
@@ -32,20 +32,20 @@ discard block |
||
32 | 32 | $params = array( |
33 | 33 | 'id' => 'Example,Required,BasketValues', |
34 | 34 | ); |
35 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
36 | - $this->view->addHelper( 'param', $helper ); |
|
35 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
36 | + $this->view->addHelper('param', $helper); |
|
37 | 37 | |
38 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
39 | - $result = json_decode( (string) $response->getBody(), true ); |
|
38 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
39 | + $result = json_decode((string) $response->getBody(), true); |
|
40 | 40 | |
41 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
42 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
41 | + $this->assertEquals(200, $response->getStatusCode()); |
|
42 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
43 | 43 | |
44 | - $this->assertEquals( 2, $result['meta']['total'] ); |
|
45 | - $this->assertInternalType( 'array', $result['data'] ); |
|
46 | - $this->assertEquals( 'basketvalues.total-value-min', $result['data'][0]['id'] ); |
|
47 | - $this->assertEquals( 'basketvalues.total-value-max', $result['data'][1]['id'] ); |
|
44 | + $this->assertEquals(2, $result['meta']['total']); |
|
45 | + $this->assertInternalType('array', $result['data']); |
|
46 | + $this->assertEquals('basketvalues.total-value-min', $result['data'][0]['id']); |
|
47 | + $this->assertEquals('basketvalues.total-value-max', $result['data'][1]['id']); |
|
48 | 48 | |
49 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
49 | + $this->assertArrayNotHasKey('errors', $result); |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | \ No newline at end of file |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | $this->context = \TestHelperJadm::getContext(); |
22 | 22 | $this->view = $this->context->getView(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Admin\JsonAdm\Service\Config\Standard( $this->context, 'service/config' ); |
|
25 | - $this->object->setAimeos( \TestHelperJadm::getAimeos() ); |
|
26 | - $this->object->setView( $this->view ); |
|
24 | + $this->object = new \Aimeos\Admin\JsonAdm\Service\Config\Standard($this->context, 'service/config'); |
|
25 | + $this->object->setAimeos(\TestHelperJadm::getAimeos()); |
|
26 | + $this->object->setView($this->view); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
@@ -33,20 +33,20 @@ discard block |
||
33 | 33 | 'id' => 'DirectDebit,Category', |
34 | 34 | 'type' => 'payment', |
35 | 35 | ); |
36 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
37 | - $this->view->addHelper( 'param', $helper ); |
|
36 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
37 | + $this->view->addHelper('param', $helper); |
|
38 | 38 | |
39 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
40 | - $result = json_decode( (string) $response->getBody(), true ); |
|
39 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
40 | + $result = json_decode((string) $response->getBody(), true); |
|
41 | 41 | |
42 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
43 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
42 | + $this->assertEquals(200, $response->getStatusCode()); |
|
43 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
44 | 44 | |
45 | - $this->assertEquals( 2, $result['meta']['total'] ); |
|
46 | - $this->assertInternalType( 'array', $result['data'] ); |
|
47 | - $this->assertEquals( 'category.include', $result['data'][0]['id'] ); |
|
48 | - $this->assertEquals( 'category.exclude', $result['data'][1]['id'] ); |
|
45 | + $this->assertEquals(2, $result['meta']['total']); |
|
46 | + $this->assertInternalType('array', $result['data']); |
|
47 | + $this->assertEquals('category.include', $result['data'][0]['id']); |
|
48 | + $this->assertEquals('category.exclude', $result['data'][1]['id']); |
|
49 | 49 | |
50 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
50 | + $this->assertArrayNotHasKey('errors', $result); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | \ No newline at end of file |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | $this->context = \TestHelperJadm::getContext(); |
22 | 22 | $this->view = $this->context->getView(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Admin\JsonAdm\Service\Standard( $this->context, 'service' ); |
|
25 | - $this->object->setAimeos( \TestHelperJadm::getAimeos() ); |
|
26 | - $this->object->setView( $this->view ); |
|
24 | + $this->object = new \Aimeos\Admin\JsonAdm\Service\Standard($this->context, 'service'); |
|
25 | + $this->object->setAimeos(\TestHelperJadm::getAimeos()); |
|
26 | + $this->object->setView($this->view); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
@@ -31,26 +31,26 @@ discard block |
||
31 | 31 | { |
32 | 32 | $params = array( |
33 | 33 | 'filter' => array( |
34 | - '==' => array( 'service.code' => 'unitpaymentcode' ) |
|
34 | + '==' => array('service.code' => 'unitpaymentcode') |
|
35 | 35 | ), |
36 | 36 | 'include' => 'text' |
37 | 37 | ); |
38 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
39 | - $this->view->addHelper( 'param', $helper ); |
|
38 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
39 | + $this->view->addHelper('param', $helper); |
|
40 | 40 | |
41 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
42 | - $result = json_decode( (string) $response->getBody(), true ); |
|
41 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
42 | + $result = json_decode((string) $response->getBody(), true); |
|
43 | 43 | |
44 | 44 | |
45 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
46 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
45 | + $this->assertEquals(200, $response->getStatusCode()); |
|
46 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
47 | 47 | |
48 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
49 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
50 | - $this->assertEquals( 'service', $result['data'][0]['type'] ); |
|
51 | - $this->assertEquals( 3, count( $result['data'][0]['relationships']['text'] ) ); |
|
52 | - $this->assertEquals( 3, count( $result['included'] ) ); |
|
48 | + $this->assertEquals(1, $result['meta']['total']); |
|
49 | + $this->assertEquals(1, count($result['data'])); |
|
50 | + $this->assertEquals('service', $result['data'][0]['type']); |
|
51 | + $this->assertEquals(3, count($result['data'][0]['relationships']['text'])); |
|
52 | + $this->assertEquals(3, count($result['included'])); |
|
53 | 53 | |
54 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
54 | + $this->assertArrayNotHasKey('errors', $result); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | \ No newline at end of file |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | $this->context = \TestHelperJadm::getContext(); |
22 | 22 | $this->view = $this->context->getView(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Admin\JsonAdm\Customer\Standard( $this->context, 'customer' ); |
|
25 | - $this->object->setAimeos( \TestHelperJadm::getAimeos() ); |
|
26 | - $this->object->setView( $this->view ); |
|
24 | + $this->object = new \Aimeos\Admin\JsonAdm\Customer\Standard($this->context, 'customer'); |
|
25 | + $this->object->setAimeos(\TestHelperJadm::getAimeos()); |
|
26 | + $this->object->setView($this->view); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
@@ -31,28 +31,28 @@ discard block |
||
31 | 31 | { |
32 | 32 | $params = array( |
33 | 33 | 'filter' => array( |
34 | - '==' => array( 'customer.code' => 'UTC001' ) |
|
34 | + '==' => array('customer.code' => 'UTC001') |
|
35 | 35 | ), |
36 | 36 | 'include' => 'text,customer/address' |
37 | 37 | ); |
38 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
39 | - $this->view->addHelper( 'param', $helper ); |
|
38 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
39 | + $this->view->addHelper('param', $helper); |
|
40 | 40 | |
41 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
42 | - $result = json_decode( (string) $response->getBody(), true ); |
|
41 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
42 | + $result = json_decode((string) $response->getBody(), true); |
|
43 | 43 | |
44 | 44 | |
45 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
46 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
45 | + $this->assertEquals(200, $response->getStatusCode()); |
|
46 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
47 | 47 | |
48 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
49 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
50 | - $this->assertEquals( 'customer', $result['data'][0]['type'] ); |
|
51 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['text'] ) ); |
|
52 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['customer/address'] ) ); |
|
53 | - $this->assertEquals( 2, count( $result['included'] ) ); |
|
48 | + $this->assertEquals(1, $result['meta']['total']); |
|
49 | + $this->assertEquals(1, count($result['data'])); |
|
50 | + $this->assertEquals('customer', $result['data'][0]['type']); |
|
51 | + $this->assertEquals(1, count($result['data'][0]['relationships']['text'])); |
|
52 | + $this->assertEquals(1, count($result['data'][0]['relationships']['customer/address'])); |
|
53 | + $this->assertEquals(2, count($result['included'])); |
|
54 | 54 | |
55 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
55 | + $this->assertArrayNotHasKey('errors', $result); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | { |
61 | 61 | $params = array( |
62 | 62 | 'filter' => array( |
63 | - '=~' => array( 'customer.code' => 'UTC' ) |
|
63 | + '=~' => array('customer.code' => 'UTC') |
|
64 | 64 | ), |
65 | 65 | 'fields' => array( |
66 | 66 | 'customer' => 'customer.id,customer.label' |
@@ -68,23 +68,23 @@ discard block |
||
68 | 68 | 'sort' => 'customer.id', |
69 | 69 | 'include' => 'customer/address' |
70 | 70 | ); |
71 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
72 | - $this->view->addHelper( 'param', $helper ); |
|
71 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
72 | + $this->view->addHelper('param', $helper); |
|
73 | 73 | |
74 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
75 | - $result = json_decode( (string) $response->getBody(), true ); |
|
74 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
75 | + $result = json_decode((string) $response->getBody(), true); |
|
76 | 76 | |
77 | 77 | |
78 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
79 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
78 | + $this->assertEquals(200, $response->getStatusCode()); |
|
79 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
80 | 80 | |
81 | - $this->assertEquals( 3, $result['meta']['total'] ); |
|
82 | - $this->assertEquals( 3, count( $result['data'] ) ); |
|
83 | - $this->assertEquals( 'customer', $result['data'][0]['type'] ); |
|
84 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
85 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['customer/address'] ) ); |
|
86 | - $this->assertEquals( 4, count( $result['included'] ) ); |
|
81 | + $this->assertEquals(3, $result['meta']['total']); |
|
82 | + $this->assertEquals(3, count($result['data'])); |
|
83 | + $this->assertEquals('customer', $result['data'][0]['type']); |
|
84 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
85 | + $this->assertEquals(1, count($result['data'][0]['relationships']['customer/address'])); |
|
86 | + $this->assertEquals(4, count($result['included'])); |
|
87 | 87 | |
88 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
88 | + $this->assertArrayNotHasKey('errors', $result); |
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | \ No newline at end of file |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | $this->context = \TestHelperJadm::getContext(); |
22 | 22 | $this->view = $this->context->getView(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Admin\JsonAdm\Order\Standard( $this->context, 'order' ); |
|
25 | - $this->object->setAimeos( \TestHelperJadm::getAimeos() ); |
|
26 | - $this->object->setView( $this->view ); |
|
24 | + $this->object = new \Aimeos\Admin\JsonAdm\Order\Standard($this->context, 'order'); |
|
25 | + $this->object->setAimeos(\TestHelperJadm::getAimeos()); |
|
26 | + $this->object->setView($this->view); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
@@ -31,25 +31,25 @@ discard block |
||
31 | 31 | { |
32 | 32 | $params = array( |
33 | 33 | 'filter' => array( |
34 | - '==' => array( 'order.editor' => 'core:unittest' ) |
|
34 | + '==' => array('order.editor' => 'core:unittest') |
|
35 | 35 | ), |
36 | 36 | 'aggregate' => 'order.cdate', |
37 | 37 | ); |
38 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
39 | - $this->view->addHelper( 'param', $helper ); |
|
38 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
39 | + $this->view->addHelper('param', $helper); |
|
40 | 40 | |
41 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
42 | - $result = json_decode( (string) $response->getBody(), true ); |
|
41 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
42 | + $result = json_decode((string) $response->getBody(), true); |
|
43 | 43 | |
44 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
45 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
44 | + $this->assertEquals(200, $response->getStatusCode()); |
|
45 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
46 | 46 | |
47 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
48 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
49 | - $this->assertEquals( 'aggregate', $result['data'][0]['type'] ); |
|
50 | - $this->assertGreaterThan( 0, $result['data'][0]['attributes'] ); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('aggregate', $result['data'][0]['type']); |
|
50 | + $this->assertGreaterThan(0, $result['data'][0]['attributes']); |
|
51 | 51 | |
52 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
52 | + $this->assertArrayNotHasKey('errors', $result); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | |
@@ -57,28 +57,28 @@ discard block |
||
57 | 57 | { |
58 | 58 | $params = array( |
59 | 59 | 'filter' => array( |
60 | - '==' => array( 'order.datepayment' => '2008-02-15 12:34:56' ) |
|
60 | + '==' => array('order.datepayment' => '2008-02-15 12:34:56') |
|
61 | 61 | ), |
62 | 62 | 'include' => 'order/base,order/status' |
63 | 63 | ); |
64 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
65 | - $this->view->addHelper( 'param', $helper ); |
|
64 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
65 | + $this->view->addHelper('param', $helper); |
|
66 | 66 | |
67 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
68 | - $result = json_decode( (string) $response->getBody(), true ); |
|
67 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
68 | + $result = json_decode((string) $response->getBody(), true); |
|
69 | 69 | |
70 | 70 | |
71 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
72 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
71 | + $this->assertEquals(200, $response->getStatusCode()); |
|
72 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
73 | 73 | |
74 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
75 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
76 | - $this->assertEquals( 'order', $result['data'][0]['type'] ); |
|
77 | - $this->assertEquals( 3, count( $result['data'][0]['relationships']['order/status'] ) ); |
|
78 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['order/base'] ) ); |
|
79 | - $this->assertEquals( 4, count( $result['included'] ) ); |
|
74 | + $this->assertEquals(1, $result['meta']['total']); |
|
75 | + $this->assertEquals(1, count($result['data'])); |
|
76 | + $this->assertEquals('order', $result['data'][0]['type']); |
|
77 | + $this->assertEquals(3, count($result['data'][0]['relationships']['order/status'])); |
|
78 | + $this->assertEquals(1, count($result['data'][0]['relationships']['order/base'])); |
|
79 | + $this->assertEquals(4, count($result['included'])); |
|
80 | 80 | |
81 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
81 | + $this->assertArrayNotHasKey('errors', $result); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | |
@@ -91,23 +91,23 @@ discard block |
||
91 | 91 | 'sort' => 'order.id', |
92 | 92 | 'include' => 'order/status' |
93 | 93 | ); |
94 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
95 | - $this->view->addHelper( 'param', $helper ); |
|
94 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
95 | + $this->view->addHelper('param', $helper); |
|
96 | 96 | |
97 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
98 | - $result = json_decode( (string) $response->getBody(), true ); |
|
97 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
98 | + $result = json_decode((string) $response->getBody(), true); |
|
99 | 99 | |
100 | 100 | |
101 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
102 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
101 | + $this->assertEquals(200, $response->getStatusCode()); |
|
102 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
103 | 103 | |
104 | - $this->assertGreaterThanOrEqual( 4, $result['meta']['total'] ); |
|
105 | - $this->assertGreaterThanOrEqual( 4, count( $result['data'] ) ); |
|
106 | - $this->assertEquals( 'order', $result['data'][0]['type'] ); |
|
107 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
108 | - $this->assertGreaterThanOrEqual( 3, count( $result['data'][0]['relationships']['order/status'] ) ); |
|
109 | - $this->assertGreaterThanOrEqual( 11, count( $result['included'] ) ); |
|
104 | + $this->assertGreaterThanOrEqual(4, $result['meta']['total']); |
|
105 | + $this->assertGreaterThanOrEqual(4, count($result['data'])); |
|
106 | + $this->assertEquals('order', $result['data'][0]['type']); |
|
107 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
108 | + $this->assertGreaterThanOrEqual(3, count($result['data'][0]['relationships']['order/status'])); |
|
109 | + $this->assertGreaterThanOrEqual(11, count($result['included'])); |
|
110 | 110 | |
111 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
111 | + $this->assertArrayNotHasKey('errors', $result); |
|
112 | 112 | } |
113 | 113 | } |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | $this->context = \TestHelperJadm::getContext(); |
22 | 22 | $this->view = $this->context->getView(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Admin\JsonAdm\Order\Base\Standard( $this->context, 'order/base' ); |
|
25 | - $this->object->setAimeos( \TestHelperJadm::getAimeos() ); |
|
26 | - $this->object->setView( $this->view ); |
|
24 | + $this->object = new \Aimeos\Admin\JsonAdm\Order\Base\Standard($this->context, 'order/base'); |
|
25 | + $this->object->setAimeos(\TestHelperJadm::getAimeos()); |
|
26 | + $this->object->setView($this->view); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
@@ -31,28 +31,28 @@ discard block |
||
31 | 31 | { |
32 | 32 | $params = array( |
33 | 33 | 'filter' => array( |
34 | - '==' => array( 'order.base.price' => '4800.00' ) |
|
34 | + '==' => array('order.base.price' => '4800.00') |
|
35 | 35 | ), |
36 | 36 | 'include' => 'order/base/address,order/base/product' |
37 | 37 | ); |
38 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
39 | - $this->view->addHelper( 'param', $helper ); |
|
38 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
39 | + $this->view->addHelper('param', $helper); |
|
40 | 40 | |
41 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
42 | - $result = json_decode( (string) $response->getBody(), true ); |
|
41 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
42 | + $result = json_decode((string) $response->getBody(), true); |
|
43 | 43 | |
44 | 44 | |
45 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
46 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
45 | + $this->assertEquals(200, $response->getStatusCode()); |
|
46 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
47 | 47 | |
48 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
49 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
50 | - $this->assertEquals( 'order/base', $result['data'][0]['type'] ); |
|
51 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['order/base/address'] ) ); |
|
52 | - $this->assertEquals( 6, count( $result['data'][0]['relationships']['order/base/product'] ) ); |
|
53 | - $this->assertEquals( 7, count( $result['included'] ) ); |
|
48 | + $this->assertEquals(1, $result['meta']['total']); |
|
49 | + $this->assertEquals(1, count($result['data'])); |
|
50 | + $this->assertEquals('order/base', $result['data'][0]['type']); |
|
51 | + $this->assertEquals(1, count($result['data'][0]['relationships']['order/base/address'])); |
|
52 | + $this->assertEquals(6, count($result['data'][0]['relationships']['order/base/product'])); |
|
53 | + $this->assertEquals(7, count($result['included'])); |
|
54 | 54 | |
55 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
55 | + $this->assertArrayNotHasKey('errors', $result); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
@@ -65,23 +65,23 @@ discard block |
||
65 | 65 | 'sort' => 'order.base.id', |
66 | 66 | 'include' => 'order/base/product' |
67 | 67 | ); |
68 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
69 | - $this->view->addHelper( 'param', $helper ); |
|
68 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
69 | + $this->view->addHelper('param', $helper); |
|
70 | 70 | |
71 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
72 | - $result = json_decode( (string) $response->getBody(), true ); |
|
71 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
72 | + $result = json_decode((string) $response->getBody(), true); |
|
73 | 73 | |
74 | 74 | |
75 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
76 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
75 | + $this->assertEquals(200, $response->getStatusCode()); |
|
76 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
77 | 77 | |
78 | - $this->assertGreaterThanOrEqual( 4, $result['meta']['total'] ); |
|
79 | - $this->assertGreaterThanOrEqual( 4, count( $result['data'] ) ); |
|
80 | - $this->assertEquals( 'order/base', $result['data'][0]['type'] ); |
|
81 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
82 | - $this->assertGreaterThanOrEqual( 4, count( $result['data'][0]['relationships']['order/base/product'] ) ); |
|
83 | - $this->assertGreaterThanOrEqual( 14, count( $result['included'] ) ); |
|
78 | + $this->assertGreaterThanOrEqual(4, $result['meta']['total']); |
|
79 | + $this->assertGreaterThanOrEqual(4, count($result['data'])); |
|
80 | + $this->assertEquals('order/base', $result['data'][0]['type']); |
|
81 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
82 | + $this->assertGreaterThanOrEqual(4, count($result['data'][0]['relationships']['order/base/product'])); |
|
83 | + $this->assertGreaterThanOrEqual(14, count($result['included'])); |
|
84 | 84 | |
85 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
85 | + $this->assertArrayNotHasKey('errors', $result); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | \ No newline at end of file |