@@ -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 |
@@ -28,6 +28,6 @@ |
||
28 | 28 | * @param array $templatePaths List of file system paths where the templates are stored |
29 | 29 | * @param string $path Name of the client separated by slashes, e.g "product/stock" |
30 | 30 | */ |
31 | - public function __construct( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, |
|
32 | - array $templatePaths, $path ); |
|
31 | + public function __construct(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, |
|
32 | + array $templatePaths, $path); |
|
33 | 33 | } |
@@ -28,5 +28,5 @@ |
||
28 | 28 | * @param string|null $name Name of the client implementation ("Standard" if null) |
29 | 29 | * @return \Aimeos\Admin\JsonAdm\Iface Client Interface |
30 | 30 | */ |
31 | - public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $path, $name = null ); |
|
31 | + public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $path, $name = null); |
|
32 | 32 | } |
33 | 33 | \ No newline at end of file |
@@ -29,6 +29,6 @@ |
||
29 | 29 | * @param array $templatePaths List of file system paths where the templates are stored |
30 | 30 | * @param string $path Name of the client separated by slashes, e.g "product/stock" |
31 | 31 | */ |
32 | - public function __construct( \Aimeos\Admin\JsonAdm\Iface $client, |
|
33 | - \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, array $templatePaths, $path ); |
|
32 | + public function __construct(\Aimeos\Admin\JsonAdm\Iface $client, |
|
33 | + \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, array $templatePaths, $path); |
|
34 | 34 | } |
35 | 35 | \ No newline at end of file |