@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $templatePaths = \TestHelperJadm::getJsonadmPaths(); |
23 | 23 | $this->view = $this->context->getView(); |
24 | 24 | |
25 | - $this->object = new \Aimeos\Admin\JsonAdm\Order\Base\Standard( $this->context, $this->view, $templatePaths, 'order/base' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Order\Base\Standard($this->context, $this->view, $templatePaths, 'order/base'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,28 +30,28 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'order.base.price' => '4800.00' ) |
|
33 | + '==' => array('order.base.price' => '4800.00') |
|
34 | 34 | ), |
35 | 35 | 'include' => 'order/base/address,order/base/product' |
36 | 36 | ); |
37 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
38 | - $this->view->addHelper( 'param', $helper ); |
|
37 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
38 | + $this->view->addHelper('param', $helper); |
|
39 | 39 | |
40 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
41 | - $result = json_decode( (string) $response->getBody(), true ); |
|
40 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
41 | + $result = json_decode((string) $response->getBody(), true); |
|
42 | 42 | |
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( 'order/base', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['order/base/address'] ) ); |
|
51 | - $this->assertEquals( 6, count( $result['data'][0]['relationships']['order/base/product'] ) ); |
|
52 | - $this->assertEquals( 7, count( $result['included'] ) ); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('order/base', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(1, count($result['data'][0]['relationships']['order/base/address'])); |
|
51 | + $this->assertEquals(6, count($result['data'][0]['relationships']['order/base/product'])); |
|
52 | + $this->assertEquals(7, count($result['included'])); |
|
53 | 53 | |
54 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
54 | + $this->assertArrayNotHasKey('errors', $result); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -64,23 +64,23 @@ discard block |
||
64 | 64 | 'sort' => 'order.base.id', |
65 | 65 | 'include' => 'order/base/product' |
66 | 66 | ); |
67 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
68 | - $this->view->addHelper( 'param', $helper ); |
|
67 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
68 | + $this->view->addHelper('param', $helper); |
|
69 | 69 | |
70 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
71 | - $result = json_decode( (string) $response->getBody(), true ); |
|
70 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
71 | + $result = json_decode((string) $response->getBody(), true); |
|
72 | 72 | |
73 | 73 | |
74 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
75 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
74 | + $this->assertEquals(200, $response->getStatusCode()); |
|
75 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
76 | 76 | |
77 | - $this->assertGreaterThanOrEqual( 4, $result['meta']['total'] ); |
|
78 | - $this->assertGreaterThanOrEqual( 4, count( $result['data'] ) ); |
|
79 | - $this->assertEquals( 'order/base', $result['data'][0]['type'] ); |
|
80 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
81 | - $this->assertGreaterThanOrEqual( 4, count( $result['data'][0]['relationships']['order/base/product'] ) ); |
|
82 | - $this->assertGreaterThanOrEqual( 14, count( $result['included'] ) ); |
|
77 | + $this->assertGreaterThanOrEqual(4, $result['meta']['total']); |
|
78 | + $this->assertGreaterThanOrEqual(4, count($result['data'])); |
|
79 | + $this->assertEquals('order/base', $result['data'][0]['type']); |
|
80 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
81 | + $this->assertGreaterThanOrEqual(4, count($result['data'][0]['relationships']['order/base/product'])); |
|
82 | + $this->assertGreaterThanOrEqual(14, count($result['included'])); |
|
83 | 83 | |
84 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
84 | + $this->assertArrayNotHasKey('errors', $result); |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | \ No newline at end of file |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $templatePaths = \TestHelperJadm::getJsonadmPaths(); |
23 | 23 | $this->view = $this->context->getView(); |
24 | 24 | |
25 | - $this->object = new \Aimeos\Admin\JsonAdm\Service\Standard( $this->context, $this->view, $templatePaths, 'service' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Service\Standard($this->context, $this->view, $templatePaths, 'service'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,26 +30,26 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'service.code' => 'unitpaymentcode' ) |
|
33 | + '==' => array('service.code' => 'unitpaymentcode') |
|
34 | 34 | ), |
35 | 35 | 'include' => 'text' |
36 | 36 | ); |
37 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
38 | - $this->view->addHelper( 'param', $helper ); |
|
37 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
38 | + $this->view->addHelper('param', $helper); |
|
39 | 39 | |
40 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
41 | - $result = json_decode( (string) $response->getBody(), true ); |
|
40 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
41 | + $result = json_decode((string) $response->getBody(), true); |
|
42 | 42 | |
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( 'service', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 3, count( $result['data'][0]['relationships']['text'] ) ); |
|
51 | - $this->assertEquals( 3, count( $result['included'] ) ); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('service', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(3, count($result['data'][0]['relationships']['text'])); |
|
51 | + $this->assertEquals(3, count($result['included'])); |
|
52 | 52 | |
53 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
53 | + $this->assertArrayNotHasKey('errors', $result); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | \ No newline at end of file |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $this->context = \TestHelperJadm::getContext(); |
23 | 23 | $this->view = $this->context->getView(); |
24 | 24 | |
25 | - $this->object = new \Aimeos\Admin\JsonAdm\Locale\Site\Standard( $this->context, $this->view, $templatePaths, 'locale/site' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Locale\Site\Standard($this->context, $this->view, $templatePaths, 'locale/site'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,152 +30,152 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'locale.site.code' => 'unittest' ) |
|
33 | + '==' => array('locale.site.code' => 'unittest') |
|
34 | 34 | ), |
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 | 42 | |
43 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
44 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
43 | + $this->assertEquals(200, $response->getStatusCode()); |
|
44 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
45 | 45 | |
46 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
47 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
48 | - $this->assertEquals( 'locale/site', $result['data'][0]['type'] ); |
|
49 | - $this->assertEquals( 0, count( $result['included'] ) ); |
|
46 | + $this->assertEquals(1, $result['meta']['total']); |
|
47 | + $this->assertEquals(1, count($result['data'])); |
|
48 | + $this->assertEquals('locale/site', $result['data'][0]['type']); |
|
49 | + $this->assertEquals(0, count($result['included'])); |
|
50 | 50 | |
51 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
51 | + $this->assertArrayNotHasKey('errors', $result); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | |
55 | 55 | public function testGetTree() |
56 | 56 | { |
57 | 57 | $params = array( |
58 | - 'id' => $this->getSiteItem( 'unittest' )->getId(), |
|
58 | + 'id' => $this->getSiteItem('unittest')->getId(), |
|
59 | 59 | 'filter' => array( |
60 | - '==' => array( 'locale.status' => 0 ) |
|
60 | + '==' => array('locale.status' => 0) |
|
61 | 61 | ), |
62 | 62 | 'include' => 'locale/site' |
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( 'locale/site', $result['data']['type'] ); |
|
76 | - $this->assertEquals( 0, count( $result['included'] ) ); |
|
74 | + $this->assertEquals(1, $result['meta']['total']); |
|
75 | + $this->assertEquals('locale/site', $result['data']['type']); |
|
76 | + $this->assertEquals(0, count($result['included'])); |
|
77 | 77 | |
78 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
78 | + $this->assertArrayNotHasKey('errors', $result); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | |
82 | 82 | public function testPatch() |
83 | 83 | { |
84 | - $stub = $this->getSiteMock( array( 'getItem', 'moveItem', 'saveItem' ) ); |
|
84 | + $stub = $this->getSiteMock(array('getItem', 'moveItem', 'saveItem')); |
|
85 | 85 | $item = $stub->createItem(); |
86 | 86 | |
87 | - $stub->expects( $this->once() )->method( 'moveItem' ); |
|
88 | - $stub->expects( $this->once() )->method( 'saveItem' ); |
|
89 | - $stub->expects( $this->exactly( 2 ) )->method( 'getItem' ) // 2x due to decorator |
|
90 | - ->will( $this->returnValue( $item ) ); |
|
87 | + $stub->expects($this->once())->method('moveItem'); |
|
88 | + $stub->expects($this->once())->method('saveItem'); |
|
89 | + $stub->expects($this->exactly(2))->method('getItem') // 2x due to decorator |
|
90 | + ->will($this->returnValue($item)); |
|
91 | 91 | |
92 | 92 | |
93 | - $params = array( 'id' => '-1' ); |
|
94 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
95 | - $this->view->addHelper( 'param', $helper ); |
|
93 | + $params = array('id' => '-1'); |
|
94 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
95 | + $this->view->addHelper('param', $helper); |
|
96 | 96 | |
97 | 97 | $body = '{"data": {"parentid": "1", "targetid": 2, "type": "locale/site", "attributes": {"locale.site.label": "test"}}}'; |
98 | - $request = $this->view->request()->withBody( $this->view->response()->createStreamFromString( $body ) ); |
|
98 | + $request = $this->view->request()->withBody($this->view->response()->createStreamFromString($body)); |
|
99 | 99 | |
100 | - $response = $this->object->patch( $request, $this->view->response() ); |
|
101 | - $result = json_decode( (string) $response->getBody(), true ); |
|
100 | + $response = $this->object->patch($request, $this->view->response()); |
|
101 | + $result = json_decode((string) $response->getBody(), true); |
|
102 | 102 | |
103 | 103 | |
104 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
105 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
104 | + $this->assertEquals(200, $response->getStatusCode()); |
|
105 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
106 | 106 | |
107 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
108 | - $this->assertArrayHasKey( 'data', $result ); |
|
109 | - $this->assertEquals( 'locale/site', $result['data']['type'] ); |
|
107 | + $this->assertEquals(1, $result['meta']['total']); |
|
108 | + $this->assertArrayHasKey('data', $result); |
|
109 | + $this->assertEquals('locale/site', $result['data']['type']); |
|
110 | 110 | |
111 | - $this->assertArrayNotHasKey( 'included', $result ); |
|
112 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
111 | + $this->assertArrayNotHasKey('included', $result); |
|
112 | + $this->assertArrayNotHasKey('errors', $result); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | |
116 | 116 | public function testPost() |
117 | 117 | { |
118 | - $stub = $this->getSiteMock( array( 'getItem', 'insertItem' ) ); |
|
118 | + $stub = $this->getSiteMock(array('getItem', 'insertItem')); |
|
119 | 119 | $item = $stub->createItem(); |
120 | 120 | |
121 | - $stub->expects( $this->any() )->method( 'getItem' ) |
|
122 | - ->will( $this->returnValue( $item ) ); |
|
123 | - $stub->expects( $this->once() )->method( 'insertItem' ); |
|
121 | + $stub->expects($this->any())->method('getItem') |
|
122 | + ->will($this->returnValue($item)); |
|
123 | + $stub->expects($this->once())->method('insertItem'); |
|
124 | 124 | |
125 | 125 | |
126 | 126 | $body = '{"data": {"type": "locale/site", "attributes": {"locale.site.code": "unittest", "locale.site.label": "Unit test"}}}'; |
127 | - $request = $this->view->request()->withBody( $this->view->response()->createStreamFromString( $body ) ); |
|
127 | + $request = $this->view->request()->withBody($this->view->response()->createStreamFromString($body)); |
|
128 | 128 | |
129 | - $response = $this->object->post( $request, $this->view->response() ); |
|
130 | - $result = json_decode( (string) $response->getBody(), true ); |
|
129 | + $response = $this->object->post($request, $this->view->response()); |
|
130 | + $result = json_decode((string) $response->getBody(), true); |
|
131 | 131 | |
132 | 132 | |
133 | - $this->assertEquals( 201, $response->getStatusCode() ); |
|
134 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
133 | + $this->assertEquals(201, $response->getStatusCode()); |
|
134 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
135 | 135 | |
136 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
137 | - $this->assertArrayHasKey( 'data', $result ); |
|
138 | - $this->assertEquals( 'locale/site', $result['data']['type'] ); |
|
136 | + $this->assertEquals(1, $result['meta']['total']); |
|
137 | + $this->assertArrayHasKey('data', $result); |
|
138 | + $this->assertEquals('locale/site', $result['data']['type']); |
|
139 | 139 | |
140 | - $this->assertArrayNotHasKey( 'included', $result ); |
|
141 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
140 | + $this->assertArrayNotHasKey('included', $result); |
|
141 | + $this->assertArrayNotHasKey('errors', $result); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | |
145 | - protected function getSiteItem( $code ) |
|
145 | + protected function getSiteItem($code) |
|
146 | 146 | { |
147 | - $manager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $this->context )->getSubManager( 'site' ); |
|
147 | + $manager = \Aimeos\MShop\Locale\Manager\Factory::createManager($this->context)->getSubManager('site'); |
|
148 | 148 | $search = $manager->createSearch(); |
149 | - $search->setConditions( $search->compare( '==', 'locale.site.code', $code ) ); |
|
150 | - $items = $manager->searchItems( $search ); |
|
149 | + $search->setConditions($search->compare('==', 'locale.site.code', $code)); |
|
150 | + $items = $manager->searchItems($search); |
|
151 | 151 | |
152 | - if( ( $item = reset( $items ) ) === false ) { |
|
153 | - throw new \RuntimeException( sprintf( 'No locale site item with code "%1$s" found', $code ) ); |
|
152 | + if (($item = reset($items)) === false) { |
|
153 | + throw new \RuntimeException(sprintf('No locale site item with code "%1$s" found', $code)); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | return $item; |
157 | 157 | } |
158 | 158 | |
159 | 159 | |
160 | - protected function getSiteMock( array $methods ) |
|
160 | + protected function getSiteMock(array $methods) |
|
161 | 161 | { |
162 | 162 | $name = 'ClientJsonAdmStandard'; |
163 | - $this->context->getConfig()->set( 'mshop/locale/manager/name', $name ); |
|
163 | + $this->context->getConfig()->set('mshop/locale/manager/name', $name); |
|
164 | 164 | |
165 | - $stub = $this->getMockBuilder( '\\Aimeos\\MShop\\Locale\\Manager\\Standard' ) |
|
166 | - ->setConstructorArgs( array( $this->context ) ) |
|
167 | - ->setMethods( array( 'getSubManager' ) ) |
|
165 | + $stub = $this->getMockBuilder('\\Aimeos\\MShop\\Locale\\Manager\\Standard') |
|
166 | + ->setConstructorArgs(array($this->context)) |
|
167 | + ->setMethods(array('getSubManager')) |
|
168 | 168 | ->getMock(); |
169 | 169 | |
170 | - $siteStub = $this->getMockBuilder( '\\Aimeos\\MShop\\Locale\\Manager\\Site\\Standard' ) |
|
171 | - ->setConstructorArgs( array( $this->context ) ) |
|
172 | - ->setMethods( $methods ) |
|
170 | + $siteStub = $this->getMockBuilder('\\Aimeos\\MShop\\Locale\\Manager\\Site\\Standard') |
|
171 | + ->setConstructorArgs(array($this->context)) |
|
172 | + ->setMethods($methods) |
|
173 | 173 | ->getMock(); |
174 | 174 | |
175 | - $stub->expects( $this->once() )->method( 'getSubManager' ) |
|
176 | - ->will( $this->returnValue( $siteStub ) ); |
|
175 | + $stub->expects($this->once())->method('getSubManager') |
|
176 | + ->will($this->returnValue($siteStub)); |
|
177 | 177 | |
178 | - \Aimeos\MShop\Locale\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Locale\\Manager\\' . $name, $stub ); |
|
178 | + \Aimeos\MShop\Locale\Manager\Factory::injectManager('\\Aimeos\\MShop\\Locale\\Manager\\' . $name, $stub); |
|
179 | 179 | |
180 | 180 | return $siteStub; |
181 | 181 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $templatePaths = \TestHelperJadm::getJsonadmPaths(); |
23 | 23 | $this->view = $this->context->getView(); |
24 | 24 | |
25 | - $this->object = new \Aimeos\Admin\JsonAdm\Media\Standard( $this->context, $this->view, $templatePaths, 'media' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Media\Standard($this->context, $this->view, $templatePaths, 'media'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,26 +30,26 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'media.label' => 'cn_colombie_179x178' ) |
|
33 | + '==' => array('media.label' => 'cn_colombie_179x178') |
|
34 | 34 | ), |
35 | 35 | 'include' => 'attribute' |
36 | 36 | ); |
37 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
38 | - $this->view->addHelper( 'param', $helper ); |
|
37 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
38 | + $this->view->addHelper('param', $helper); |
|
39 | 39 | |
40 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
41 | - $result = json_decode( (string) $response->getBody(), true ); |
|
40 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
41 | + $result = json_decode((string) $response->getBody(), true); |
|
42 | 42 | |
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( 'media', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['attribute'] ) ); |
|
51 | - $this->assertEquals( 1, count( $result['included'] ) ); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('media', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(1, count($result['data'][0]['relationships']['attribute'])); |
|
51 | + $this->assertEquals(1, count($result['included'])); |
|
52 | 52 | |
53 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
53 | + $this->assertArrayNotHasKey('errors', $result); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | \ No newline at end of file |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $templatePaths = \TestHelperJadm::getJsonadmPaths(); |
23 | 23 | $this->view = $this->context->getView(); |
24 | 24 | |
25 | - $this->object = new \Aimeos\Admin\JsonAdm\Attribute\Standard( $this->context, $this->view, $templatePaths, 'attribute' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Attribute\Standard($this->context, $this->view, $templatePaths, 'attribute'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,26 +30,26 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'attribute.code' => 's' ) |
|
33 | + '==' => array('attribute.code' => 's') |
|
34 | 34 | ), |
35 | 35 | 'include' => 'text' |
36 | 36 | ); |
37 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
38 | - $this->view->addHelper( 'param', $helper ); |
|
37 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
38 | + $this->view->addHelper('param', $helper); |
|
39 | 39 | |
40 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
41 | - $result = json_decode( (string) $response->getBody(), true ); |
|
40 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
41 | + $result = json_decode((string) $response->getBody(), true); |
|
42 | 42 | |
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( 'attribute', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['text'] ) ); |
|
51 | - $this->assertEquals( 1, count( $result['included'] ) ); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('attribute', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(1, count($result['data'][0]['relationships']['text'])); |
|
51 | + $this->assertEquals(1, count($result['included'])); |
|
52 | 52 | |
53 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
53 | + $this->assertArrayNotHasKey('errors', $result); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | \ No newline at end of file |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $templatePaths = \TestHelperJadm::getJsonadmPaths(); |
23 | 23 | $this->view = $this->context->getView(); |
24 | 24 | |
25 | - $this->object = new \Aimeos\Admin\JsonAdm\Product\Standard( $this->context, $this->view, $templatePaths, 'product' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Product\Standard($this->context, $this->view, $templatePaths, 'product'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,34 +30,34 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'product.code' => 'CNE' ) |
|
33 | + '==' => array('product.code' => 'CNE') |
|
34 | 34 | ), |
35 | 35 | 'include' => 'text,product,product/property' |
36 | 36 | ); |
37 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
38 | - $this->view->addHelper( 'param', $helper ); |
|
39 | - |
|
40 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
41 | - $result = json_decode( (string) $response->getBody(), true ); |
|
42 | - |
|
43 | - |
|
44 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
45 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
46 | - |
|
47 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
48 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
49 | - $this->assertEquals( 'product', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 6, count( $result['data'][0]['relationships']['text'] ) ); |
|
51 | - $this->assertArrayHaskey( 'self', $result['data'][0]['relationships']['text'][0]['data']['links'] ); |
|
52 | - $this->assertEquals( 5, count( $result['data'][0]['relationships']['product'] ) ); |
|
53 | - $this->assertArrayHaskey( 'self', $result['data'][0]['relationships']['product'][0]['data']['links'] ); |
|
54 | - $this->assertEquals( 4, count( $result['data'][0]['relationships']['product/property'] ) ); |
|
55 | - $this->assertEquals( 14, count( $result['included'] ) ); |
|
56 | - $this->assertEquals( 'product/property', $result['included'][0]['type'] ); |
|
57 | - $this->assertArrayHaskey( 'self', $result['included'][0]['links'] ); |
|
58 | - $this->assertArrayHaskey( 'related', $result['included'][0]['links'] ); |
|
59 | - |
|
60 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
37 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
38 | + $this->view->addHelper('param', $helper); |
|
39 | + |
|
40 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
41 | + $result = json_decode((string) $response->getBody(), true); |
|
42 | + |
|
43 | + |
|
44 | + $this->assertEquals(200, $response->getStatusCode()); |
|
45 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
46 | + |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('product', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(6, count($result['data'][0]['relationships']['text'])); |
|
51 | + $this->assertArrayHaskey('self', $result['data'][0]['relationships']['text'][0]['data']['links']); |
|
52 | + $this->assertEquals(5, count($result['data'][0]['relationships']['product'])); |
|
53 | + $this->assertArrayHaskey('self', $result['data'][0]['relationships']['product'][0]['data']['links']); |
|
54 | + $this->assertEquals(4, count($result['data'][0]['relationships']['product/property'])); |
|
55 | + $this->assertEquals(14, count($result['included'])); |
|
56 | + $this->assertEquals('product/property', $result['included'][0]['type']); |
|
57 | + $this->assertArrayHaskey('self', $result['included'][0]['links']); |
|
58 | + $this->assertArrayHaskey('related', $result['included'][0]['links']); |
|
59 | + |
|
60 | + $this->assertArrayNotHasKey('errors', $result); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | |
@@ -70,23 +70,23 @@ discard block |
||
70 | 70 | 'sort' => 'product.id', |
71 | 71 | 'include' => 'product,product/property' |
72 | 72 | ); |
73 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
74 | - $this->view->addHelper( 'param', $helper ); |
|
73 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
74 | + $this->view->addHelper('param', $helper); |
|
75 | 75 | |
76 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
77 | - $result = json_decode( (string) $response->getBody(), true ); |
|
76 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
77 | + $result = json_decode((string) $response->getBody(), true); |
|
78 | 78 | |
79 | 79 | |
80 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
81 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
80 | + $this->assertEquals(200, $response->getStatusCode()); |
|
81 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
82 | 82 | |
83 | - $this->assertEquals( 28, $result['meta']['total'] ); |
|
84 | - $this->assertEquals( 25, count( $result['data'] ) ); |
|
85 | - $this->assertEquals( 'product', $result['data'][0]['type'] ); |
|
86 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
87 | - $this->assertEquals( 5, count( $result['data'][0]['relationships']['product'] ) ); |
|
88 | - $this->assertEquals( 21, count( $result['included'] ) ); |
|
83 | + $this->assertEquals(28, $result['meta']['total']); |
|
84 | + $this->assertEquals(25, count($result['data'])); |
|
85 | + $this->assertEquals('product', $result['data'][0]['type']); |
|
86 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
87 | + $this->assertEquals(5, count($result['data'][0]['relationships']['product'])); |
|
88 | + $this->assertEquals(21, count($result['included'])); |
|
89 | 89 | |
90 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
90 | + $this->assertArrayNotHasKey('errors', $result); |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | \ No newline at end of file |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $templatePaths = \TestHelperJadm::getJsonadmPaths(); |
23 | 23 | $this->view = $this->context->getView(); |
24 | 24 | |
25 | - $this->object = new \Aimeos\Admin\JsonAdm\Coupon\Standard( $this->context, $this->view, $templatePaths, 'coupon' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Coupon\Standard($this->context, $this->view, $templatePaths, 'coupon'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,27 +30,27 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'coupon.code.code' => '90AB' ) |
|
33 | + '==' => array('coupon.code.code' => '90AB') |
|
34 | 34 | ), |
35 | 35 | 'include' => 'coupon/code' |
36 | 36 | ); |
37 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
38 | - $this->view->addHelper( 'param', $helper ); |
|
37 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
38 | + $this->view->addHelper('param', $helper); |
|
39 | 39 | |
40 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
41 | - $result = json_decode( (string) $response->getBody(), true ); |
|
40 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
41 | + $result = json_decode((string) $response->getBody(), true); |
|
42 | 42 | |
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( 'coupon', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['coupon/code'] ) ); |
|
51 | - $this->assertEquals( 1, count( $result['included'] ) ); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('coupon', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(1, count($result['data'][0]['relationships']['coupon/code'])); |
|
51 | + $this->assertEquals(1, count($result['included'])); |
|
52 | 52 | |
53 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
53 | + $this->assertArrayNotHasKey('errors', $result); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
@@ -63,22 +63,22 @@ discard block |
||
63 | 63 | 'sort' => 'coupon.id', |
64 | 64 | 'include' => 'coupon/code' |
65 | 65 | ); |
66 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
67 | - $this->view->addHelper( 'param', $helper ); |
|
66 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
67 | + $this->view->addHelper('param', $helper); |
|
68 | 68 | |
69 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
70 | - $result = json_decode( (string) $response->getBody(), true ); |
|
69 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
70 | + $result = json_decode((string) $response->getBody(), true); |
|
71 | 71 | |
72 | 72 | |
73 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
74 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
73 | + $this->assertEquals(200, $response->getStatusCode()); |
|
74 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
75 | 75 | |
76 | - $this->assertEquals( 5, $result['meta']['total'] ); |
|
77 | - $this->assertEquals( 5, count( $result['data'] ) ); |
|
78 | - $this->assertEquals( 'coupon', $result['data'][0]['type'] ); |
|
79 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
80 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['coupon/code'] ) ); |
|
81 | - $this->assertEquals( 5, count( $result['included'] ) ); |
|
82 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
76 | + $this->assertEquals(5, $result['meta']['total']); |
|
77 | + $this->assertEquals(5, count($result['data'])); |
|
78 | + $this->assertEquals('coupon', $result['data'][0]['type']); |
|
79 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
80 | + $this->assertEquals(1, count($result['data'][0]['relationships']['coupon/code'])); |
|
81 | + $this->assertEquals(5, count($result['included'])); |
|
82 | + $this->assertArrayNotHasKey('errors', $result); |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 | \ No newline at end of file |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $templatePaths = \TestHelperJadm::getJsonadmPaths(); |
23 | 23 | $this->view = $this->context->getView(); |
24 | 24 | |
25 | - $this->object = new \Aimeos\Admin\JsonAdm\Customer\Standard( $this->context, $this->view, $templatePaths, 'customer' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Customer\Standard($this->context, $this->view, $templatePaths, 'customer'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,28 +30,28 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'customer.code' => 'UTC001' ) |
|
33 | + '==' => array('customer.code' => 'UTC001') |
|
34 | 34 | ), |
35 | 35 | 'include' => 'text,customer/address' |
36 | 36 | ); |
37 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
38 | - $this->view->addHelper( 'param', $helper ); |
|
37 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
38 | + $this->view->addHelper('param', $helper); |
|
39 | 39 | |
40 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
41 | - $result = json_decode( (string) $response->getBody(), true ); |
|
40 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
41 | + $result = json_decode((string) $response->getBody(), true); |
|
42 | 42 | |
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( 'customer', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['text'] ) ); |
|
51 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['customer/address'] ) ); |
|
52 | - $this->assertEquals( 2, count( $result['included'] ) ); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('customer', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(1, count($result['data'][0]['relationships']['text'])); |
|
51 | + $this->assertEquals(1, count($result['data'][0]['relationships']['customer/address'])); |
|
52 | + $this->assertEquals(2, count($result['included'])); |
|
53 | 53 | |
54 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
54 | + $this->assertArrayNotHasKey('errors', $result); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | { |
60 | 60 | $params = array( |
61 | 61 | 'filter' => array( |
62 | - '=~' => array( 'customer.code' => 'UTC' ) |
|
62 | + '=~' => array('customer.code' => 'UTC') |
|
63 | 63 | ), |
64 | 64 | 'fields' => array( |
65 | 65 | 'customer' => 'customer.id,customer.label' |
@@ -67,23 +67,23 @@ discard block |
||
67 | 67 | 'sort' => 'customer.id', |
68 | 68 | 'include' => 'customer/address' |
69 | 69 | ); |
70 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
71 | - $this->view->addHelper( 'param', $helper ); |
|
70 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
71 | + $this->view->addHelper('param', $helper); |
|
72 | 72 | |
73 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
74 | - $result = json_decode( (string) $response->getBody(), true ); |
|
73 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
74 | + $result = json_decode((string) $response->getBody(), true); |
|
75 | 75 | |
76 | 76 | |
77 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
78 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
77 | + $this->assertEquals(200, $response->getStatusCode()); |
|
78 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
79 | 79 | |
80 | - $this->assertEquals( 3, $result['meta']['total'] ); |
|
81 | - $this->assertEquals( 3, count( $result['data'] ) ); |
|
82 | - $this->assertEquals( 'customer', $result['data'][0]['type'] ); |
|
83 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
84 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['customer/address'] ) ); |
|
85 | - $this->assertEquals( 4, count( $result['included'] ) ); |
|
80 | + $this->assertEquals(3, $result['meta']['total']); |
|
81 | + $this->assertEquals(3, count($result['data'])); |
|
82 | + $this->assertEquals('customer', $result['data'][0]['type']); |
|
83 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
84 | + $this->assertEquals(1, count($result['data'][0]['relationships']['customer/address'])); |
|
85 | + $this->assertEquals(4, count($result['included'])); |
|
86 | 86 | |
87 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
87 | + $this->assertArrayNotHasKey('errors', $result); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | \ No newline at end of file |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $templatePaths = \TestHelperJadm::getJsonadmPaths(); |
23 | 23 | $this->view = $this->context->getView(); |
24 | 24 | |
25 | - $this->object = new \Aimeos\Admin\JsonAdm\Text\Standard( $this->context, $this->view, $templatePaths, 'text' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Text\Standard($this->context, $this->view, $templatePaths, 'text'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,26 +30,26 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'text.label' => 'misc_long_desc' ) |
|
33 | + '==' => array('text.label' => 'misc_long_desc') |
|
34 | 34 | ), |
35 | 35 | 'include' => 'media' |
36 | 36 | ); |
37 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
38 | - $this->view->addHelper( 'param', $helper ); |
|
37 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
38 | + $this->view->addHelper('param', $helper); |
|
39 | 39 | |
40 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
41 | - $result = json_decode( (string) $response->getBody(), true ); |
|
40 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
41 | + $result = json_decode((string) $response->getBody(), true); |
|
42 | 42 | |
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( 'text', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 4, count( $result['data'][0]['relationships']['media'] ) ); |
|
51 | - $this->assertEquals( 4, count( $result['included'] ) ); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('text', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(4, count($result['data'][0]['relationships']['media'])); |
|
51 | + $this->assertEquals(4, count($result['included'])); |
|
52 | 52 | |
53 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
53 | + $this->assertArrayNotHasKey('errors', $result); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | \ No newline at end of file |