@@ -7,15 +7,15 @@ |
||
7 | 7 | |
8 | 8 | |
9 | 9 | error_reporting( -1 ); |
10 | -ini_set( 'display_errors', '1' ); |
|
10 | +ini_set('display_errors', '1'); |
|
11 | 11 | |
12 | -date_default_timezone_set( 'UTC' ); |
|
12 | +date_default_timezone_set('UTC'); |
|
13 | 13 | |
14 | 14 | // Set locale settings to reasonable defaults |
15 | -setlocale( LC_ALL, 'en_US.UTF-8' ); |
|
16 | -setlocale( LC_NUMERIC, 'POSIX' ); |
|
17 | -setlocale( LC_CTYPE, 'en_US.UTF-8' ); |
|
18 | -setlocale( LC_TIME, 'POSIX' ); |
|
15 | +setlocale(LC_ALL, 'en_US.UTF-8'); |
|
16 | +setlocale(LC_NUMERIC, 'POSIX'); |
|
17 | +setlocale(LC_CTYPE, 'en_US.UTF-8'); |
|
18 | +setlocale(LC_TIME, 'POSIX'); |
|
19 | 19 | |
20 | 20 | require_once 'TestHelperJadm.php'; |
21 | 21 | \TestHelperJadm::bootstrap(); |
@@ -107,17 +107,17 @@ |
||
107 | 107 | * @param array $include List of resource types that should be fetched |
108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
109 | 109 | */ |
110 | - protected function getListItems( array $items, array $include ) |
|
110 | + protected function getListItems(array $items, array $include) |
|
111 | 111 | { |
112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'text/lists' ); |
|
112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'text/lists'); |
|
113 | 113 | |
114 | 114 | $search = $manager->createSearch(); |
115 | 115 | $expr = array( |
116 | - $search->compare( '==', 'text.lists.parentid', array_keys( $items ) ), |
|
117 | - $search->compare( '==', 'text.lists.domain', $include ), |
|
116 | + $search->compare('==', 'text.lists.parentid', array_keys($items)), |
|
117 | + $search->compare('==', 'text.lists.domain', $include), |
|
118 | 118 | ); |
119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
119 | + $search->setConditions($search->combine('&&', $expr)); |
|
120 | 120 | |
121 | - return $manager->searchItems( $search ); |
|
121 | + return $manager->searchItems($search); |
|
122 | 122 | } |
123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
107 | 107 | * @param array $include List of resource types that should be fetched |
108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
109 | 109 | */ |
110 | - protected function getListItems( array $items, array $include ) |
|
110 | + protected function getListItems(array $items, array $include) |
|
111 | 111 | { |
112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'price/lists' ); |
|
112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'price/lists'); |
|
113 | 113 | |
114 | 114 | $search = $manager->createSearch(); |
115 | 115 | $expr = array( |
116 | - $search->compare( '==', 'price.lists.parentid', array_keys( $items ) ), |
|
117 | - $search->compare( '==', 'price.lists.domain', $include ), |
|
116 | + $search->compare('==', 'price.lists.parentid', array_keys($items)), |
|
117 | + $search->compare('==', 'price.lists.domain', $include), |
|
118 | 118 | ); |
119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
119 | + $search->setConditions($search->combine('&&', $expr)); |
|
120 | 120 | |
121 | - return $manager->searchItems( $search ); |
|
121 | + return $manager->searchItems($search); |
|
122 | 122 | } |
123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
107 | 107 | * @param array $include List of resource types that should be fetched |
108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
109 | 109 | */ |
110 | - protected function getListItems( array $items, array $include ) |
|
110 | + protected function getListItems(array $items, array $include) |
|
111 | 111 | { |
112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute/lists' ); |
|
112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute/lists'); |
|
113 | 113 | |
114 | 114 | $search = $manager->createSearch(); |
115 | 115 | $expr = array( |
116 | - $search->compare( '==', 'attribute.lists.parentid', array_keys( $items ) ), |
|
117 | - $search->compare( '==', 'attribute.lists.domain', $include ), |
|
116 | + $search->compare('==', 'attribute.lists.parentid', array_keys($items)), |
|
117 | + $search->compare('==', 'attribute.lists.domain', $include), |
|
118 | 118 | ); |
119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
119 | + $search->setConditions($search->combine('&&', $expr)); |
|
120 | 120 | |
121 | - return $manager->searchItems( $search ); |
|
121 | + return $manager->searchItems($search); |
|
122 | 122 | } |
123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
107 | 107 | * @param array $include List of resource types that should be fetched |
108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
109 | 109 | */ |
110 | - protected function getListItems( array $items, array $include ) |
|
110 | + protected function getListItems(array $items, array $include) |
|
111 | 111 | { |
112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service/lists' ); |
|
112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service/lists'); |
|
113 | 113 | |
114 | 114 | $search = $manager->createSearch(); |
115 | 115 | $expr = array( |
116 | - $search->compare( '==', 'service.lists.parentid', array_keys( $items ) ), |
|
117 | - $search->compare( '==', 'service.lists.domain', $include ), |
|
116 | + $search->compare('==', 'service.lists.parentid', array_keys($items)), |
|
117 | + $search->compare('==', 'service.lists.domain', $include), |
|
118 | 118 | ); |
119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
119 | + $search->setConditions($search->combine('&&', $expr)); |
|
120 | 120 | |
121 | - return $manager->searchItems( $search ); |
|
121 | + return $manager->searchItems($search); |
|
122 | 122 | } |
123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
107 | 107 | * @param array $include List of resource types that should be fetched |
108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
109 | 109 | */ |
110 | - protected function getListItems( array $items, array $include ) |
|
110 | + protected function getListItems(array $items, array $include) |
|
111 | 111 | { |
112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'media/lists' ); |
|
112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'media/lists'); |
|
113 | 113 | |
114 | 114 | $search = $manager->createSearch(); |
115 | 115 | $expr = array( |
116 | - $search->compare( '==', 'media.lists.parentid', array_keys( $items ) ), |
|
117 | - $search->compare( '==', 'media.lists.domain', $include ), |
|
116 | + $search->compare('==', 'media.lists.parentid', array_keys($items)), |
|
117 | + $search->compare('==', 'media.lists.domain', $include), |
|
118 | 118 | ); |
119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
119 | + $search->setConditions($search->combine('&&', $expr)); |
|
120 | 120 | |
121 | - return $manager->searchItems( $search ); |
|
121 | + return $manager->searchItems($search); |
|
122 | 122 | } |
123 | 123 | } |
@@ -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\Supplier\Standard( $this->context, $this->view, $templatePaths, 'supplier' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Supplier\Standard($this->context, $this->view, $templatePaths, 'supplier'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,28 +30,28 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'supplier.code' => 'unitCode001' ) |
|
33 | + '==' => array('supplier.code' => 'unitCode001') |
|
34 | 34 | ), |
35 | 35 | 'include' => 'text,supplier/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( 'supplier', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 3, count( $result['data'][0]['relationships']['text'] ) ); |
|
51 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['supplier/address'] ) ); |
|
52 | - $this->assertEquals( 4, count( $result['included'] ) ); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('supplier', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(3, count($result['data'][0]['relationships']['text'])); |
|
51 | + $this->assertEquals(1, count($result['data'][0]['relationships']['supplier/address'])); |
|
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 | |
@@ -64,23 +64,23 @@ discard block |
||
64 | 64 | 'sort' => 'supplier.id', |
65 | 65 | 'include' => 'supplier/address' |
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->assertEquals( 3, $result['meta']['total'] ); |
|
78 | - $this->assertEquals( 3, count( $result['data'] ) ); |
|
79 | - $this->assertEquals( 'supplier', $result['data'][0]['type'] ); |
|
80 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
81 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['supplier/address'] ) ); |
|
82 | - $this->assertEquals( 3, count( $result['included'] ) ); |
|
77 | + $this->assertEquals(3, $result['meta']['total']); |
|
78 | + $this->assertEquals(3, count($result['data'])); |
|
79 | + $this->assertEquals('supplier', $result['data'][0]['type']); |
|
80 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
81 | + $this->assertEquals(1, count($result['data'][0]['relationships']['supplier/address'])); |
|
82 | + $this->assertEquals(3, 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\Order\Standard( $this->context, $this->view, $templatePaths, 'order' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Order\Standard($this->context, $this->view, $templatePaths, 'order'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,26 +30,26 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'order.editor' => 'core:unittest' ) |
|
33 | + '==' => array('order.editor' => 'core:unittest') |
|
34 | 34 | ), |
35 | 35 | 'aggregate' => 'order.cdate', |
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( 'aggregate', $result['data'][0]['type'] ); |
|
50 | - $this->assertGreaterThan( 0, count( $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, count($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 | } |
@@ -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 |