@@ -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,26 +30,26 @@ 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 | 40 | $header = array(); |
41 | 41 | $status = 500; |
42 | 42 | |
43 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
43 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
44 | 44 | |
45 | - $this->assertEquals( 200, $status ); |
|
46 | - $this->assertEquals( 1, count( $header ) ); |
|
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 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
45 | + $this->assertEquals(200, $status); |
|
46 | + $this->assertEquals(1, count($header)); |
|
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 | + $this->assertArrayNotHasKey('errors', $result); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | |
@@ -62,22 +62,22 @@ discard block |
||
62 | 62 | 'sort' => 'coupon.id', |
63 | 63 | 'include' => 'coupon/code' |
64 | 64 | ); |
65 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
66 | - $this->view->addHelper( 'param', $helper ); |
|
65 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
66 | + $this->view->addHelper('param', $helper); |
|
67 | 67 | |
68 | 68 | $header = array(); |
69 | 69 | $status = 500; |
70 | 70 | |
71 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
72 | - |
|
73 | - $this->assertEquals( 200, $status ); |
|
74 | - $this->assertEquals( 1, count( $header ) ); |
|
75 | - $this->assertEquals( 5, $result['meta']['total'] ); |
|
76 | - $this->assertEquals( 5, count( $result['data'] ) ); |
|
77 | - $this->assertEquals( 'coupon', $result['data'][0]['type'] ); |
|
78 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
79 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['coupon/code'] ) ); |
|
80 | - $this->assertEquals( 5, count( $result['included'] ) ); |
|
81 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
71 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
72 | + |
|
73 | + $this->assertEquals(200, $status); |
|
74 | + $this->assertEquals(1, count($header)); |
|
75 | + $this->assertEquals(5, $result['meta']['total']); |
|
76 | + $this->assertEquals(5, count($result['data'])); |
|
77 | + $this->assertEquals('coupon', $result['data'][0]['type']); |
|
78 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
79 | + $this->assertEquals(1, count($result['data'][0]['relationships']['coupon/code'])); |
|
80 | + $this->assertEquals(5, count($result['included'])); |
|
81 | + $this->assertArrayNotHasKey('errors', $result); |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 | \ 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\Catalog\Standard( $this->context, $this->view, $templatePaths, 'catalog' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Catalog\Standard($this->context, $this->view, $templatePaths, 'catalog'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,25 +30,25 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'catalog.code' => 'cafe' ) |
|
33 | + '==' => array('catalog.code' => 'cafe') |
|
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 | 40 | $header = array(); |
41 | 41 | $status = 500; |
42 | 42 | |
43 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
43 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
44 | 44 | |
45 | - $this->assertEquals( 200, $status ); |
|
46 | - $this->assertEquals( 1, count( $header ) ); |
|
47 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
48 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
49 | - $this->assertEquals( 'catalog', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 6, count( $result['data'][0]['relationships']['text'] ) ); |
|
51 | - $this->assertEquals( 6, count( $result['included'] ) ); |
|
52 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
45 | + $this->assertEquals(200, $status); |
|
46 | + $this->assertEquals(1, count($header)); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('catalog', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(6, count($result['data'][0]['relationships']['text'])); |
|
51 | + $this->assertEquals(6, count($result['included'])); |
|
52 | + $this->assertArrayNotHasKey('errors', $result); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | \ 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,27 +30,27 @@ 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 | 40 | $header = array(); |
41 | 41 | $status = 500; |
42 | 42 | |
43 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
44 | - |
|
45 | - $this->assertEquals( 200, $status ); |
|
46 | - $this->assertEquals( 1, count( $header ) ); |
|
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 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
43 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
44 | + |
|
45 | + $this->assertEquals(200, $status); |
|
46 | + $this->assertEquals(1, count($header)); |
|
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 | + $this->assertArrayNotHasKey('errors', $result); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
@@ -63,22 +63,22 @@ discard block |
||
63 | 63 | 'sort' => 'customer.id', |
64 | 64 | 'include' => 'customer/address' |
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 | 69 | $header = array(); |
70 | 70 | $status = 500; |
71 | 71 | |
72 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
73 | - |
|
74 | - $this->assertEquals( 200, $status ); |
|
75 | - $this->assertEquals( 1, count( $header ) ); |
|
76 | - $this->assertEquals( 3, $result['meta']['total'] ); |
|
77 | - $this->assertEquals( 3, count( $result['data'] ) ); |
|
78 | - $this->assertEquals( 'customer', $result['data'][0]['type'] ); |
|
79 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
80 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['customer/address'] ) ); |
|
81 | - $this->assertEquals( 4, count( $result['included'] ) ); |
|
82 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
72 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
73 | + |
|
74 | + $this->assertEquals(200, $status); |
|
75 | + $this->assertEquals(1, count($header)); |
|
76 | + $this->assertEquals(3, $result['meta']['total']); |
|
77 | + $this->assertEquals(3, count($result['data'])); |
|
78 | + $this->assertEquals('customer', $result['data'][0]['type']); |
|
79 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
80 | + $this->assertEquals(1, count($result['data'][0]['relationships']['customer/address'])); |
|
81 | + $this->assertEquals(4, 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\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,27 +30,27 @@ 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 | 40 | $header = array(); |
41 | 41 | $status = 500; |
42 | 42 | |
43 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
44 | - |
|
45 | - $this->assertEquals( 200, $status ); |
|
46 | - $this->assertEquals( 1, count( $header ) ); |
|
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 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
43 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
44 | + |
|
45 | + $this->assertEquals(200, $status); |
|
46 | + $this->assertEquals(1, count($header)); |
|
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 | + $this->assertArrayNotHasKey('errors', $result); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
@@ -63,22 +63,22 @@ discard block |
||
63 | 63 | 'sort' => 'supplier.id', |
64 | 64 | 'include' => 'supplier/address' |
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 | 69 | $header = array(); |
70 | 70 | $status = 500; |
71 | 71 | |
72 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
73 | - |
|
74 | - $this->assertEquals( 200, $status ); |
|
75 | - $this->assertEquals( 1, count( $header ) ); |
|
76 | - $this->assertEquals( 3, $result['meta']['total'] ); |
|
77 | - $this->assertEquals( 3, count( $result['data'] ) ); |
|
78 | - $this->assertEquals( 'supplier', $result['data'][0]['type'] ); |
|
79 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
80 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['supplier/address'] ) ); |
|
81 | - $this->assertEquals( 3, count( $result['included'] ) ); |
|
82 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
72 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
73 | + |
|
74 | + $this->assertEquals(200, $status); |
|
75 | + $this->assertEquals(1, count($header)); |
|
76 | + $this->assertEquals(3, $result['meta']['total']); |
|
77 | + $this->assertEquals(3, count($result['data'])); |
|
78 | + $this->assertEquals('supplier', $result['data'][0]['type']); |
|
79 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
80 | + $this->assertEquals(1, count($result['data'][0]['relationships']['supplier/address'])); |
|
81 | + $this->assertEquals(3, count($result['included'])); |
|
82 | + $this->assertArrayNotHasKey('errors', $result); |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 | \ No newline at end of file |
@@ -20,17 +20,17 @@ discard block |
||
20 | 20 | $context = \TestHelperJadm::getContext(); |
21 | 21 | $view = $context->getView(); |
22 | 22 | |
23 | - $this->stub = $this->getMockBuilder( '\\Aimeos\\Admin\\JsonAdm\\Standard' ) |
|
24 | - ->setConstructorArgs( array( $context, $view, array(), 'attribute' ) ) |
|
23 | + $this->stub = $this->getMockBuilder('\\Aimeos\\Admin\\JsonAdm\\Standard') |
|
24 | + ->setConstructorArgs(array($context, $view, array(), 'attribute')) |
|
25 | 25 | ->getMock(); |
26 | 26 | |
27 | - $this->object = new TestBase( $this->stub, $context, $view, array(), 'attribute' ); |
|
27 | + $this->object = new TestBase($this->stub, $context, $view, array(), 'attribute'); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | |
31 | 31 | protected function tearDown() |
32 | 32 | { |
33 | - unset( $this->object, $this->stub ); |
|
33 | + unset($this->object, $this->stub); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | $status = 0; |
40 | 40 | $header = array(); |
41 | 41 | |
42 | - $this->stub->expects( $this->once() ) |
|
43 | - ->method( 'delete' ) |
|
44 | - ->will( $this->returnValue( 'test' ) ); |
|
42 | + $this->stub->expects($this->once()) |
|
43 | + ->method('delete') |
|
44 | + ->will($this->returnValue('test')); |
|
45 | 45 | |
46 | - $this->assertEquals( 'test', $this->object->delete( '', $header, $status ) ); |
|
46 | + $this->assertEquals('test', $this->object->delete('', $header, $status)); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | $status = 0; |
53 | 53 | $header = array(); |
54 | 54 | |
55 | - $this->stub->expects( $this->once() ) |
|
56 | - ->method( 'get' ) |
|
57 | - ->will( $this->returnValue( 'test' ) ); |
|
55 | + $this->stub->expects($this->once()) |
|
56 | + ->method('get') |
|
57 | + ->will($this->returnValue('test')); |
|
58 | 58 | |
59 | - $this->assertEquals( 'test', $this->object->get( '', $header, $status ) ); |
|
59 | + $this->assertEquals('test', $this->object->get('', $header, $status)); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | $status = 0; |
66 | 66 | $header = array(); |
67 | 67 | |
68 | - $this->stub->expects( $this->once() ) |
|
69 | - ->method( 'patch' ) |
|
70 | - ->will( $this->returnValue( 'test' ) ); |
|
68 | + $this->stub->expects($this->once()) |
|
69 | + ->method('patch') |
|
70 | + ->will($this->returnValue('test')); |
|
71 | 71 | |
72 | - $this->assertEquals( 'test', $this->object->patch( '', $header, $status ) ); |
|
72 | + $this->assertEquals('test', $this->object->patch('', $header, $status)); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | |
@@ -78,11 +78,11 @@ discard block |
||
78 | 78 | $status = 0; |
79 | 79 | $header = array(); |
80 | 80 | |
81 | - $this->stub->expects( $this->once() ) |
|
82 | - ->method( 'post' ) |
|
83 | - ->will( $this->returnValue( 'test' ) ); |
|
81 | + $this->stub->expects($this->once()) |
|
82 | + ->method('post') |
|
83 | + ->will($this->returnValue('test')); |
|
84 | 84 | |
85 | - $this->assertEquals( 'test', $this->object->post( '', $header, $status ) ); |
|
85 | + $this->assertEquals('test', $this->object->post('', $header, $status)); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | $status = 0; |
92 | 92 | $header = array(); |
93 | 93 | |
94 | - $this->stub->expects( $this->once() ) |
|
95 | - ->method( 'put' ) |
|
96 | - ->will( $this->returnValue( 'test' ) ); |
|
94 | + $this->stub->expects($this->once()) |
|
95 | + ->method('put') |
|
96 | + ->will($this->returnValue('test')); |
|
97 | 97 | |
98 | - $this->assertEquals( 'test', $this->object->put( '', $header, $status ) ); |
|
98 | + $this->assertEquals('test', $this->object->put('', $header, $status)); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | |
@@ -104,35 +104,35 @@ discard block |
||
104 | 104 | $status = 0; |
105 | 105 | $header = array(); |
106 | 106 | |
107 | - $this->stub->expects( $this->once() ) |
|
108 | - ->method( 'options' ) |
|
109 | - ->will( $this->returnValue( 'test' ) ); |
|
107 | + $this->stub->expects($this->once()) |
|
108 | + ->method('options') |
|
109 | + ->will($this->returnValue('test')); |
|
110 | 110 | |
111 | - $this->assertEquals( 'test', $this->object->options( '', $header, $status ) ); |
|
111 | + $this->assertEquals('test', $this->object->options('', $header, $status)); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | |
115 | 115 | public function testGetContext() |
116 | 116 | { |
117 | - $this->assertInstanceOf( '\\Aimeos\\MShop\\Context\\Item\\Iface', $this->object->getContextPublic() ); |
|
117 | + $this->assertInstanceOf('\\Aimeos\\MShop\\Context\\Item\\Iface', $this->object->getContextPublic()); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | |
121 | 121 | public function testGetTemplatePaths() |
122 | 122 | { |
123 | - $this->assertEquals( array(), $this->object->getTemplatePathsPublic() ); |
|
123 | + $this->assertEquals(array(), $this->object->getTemplatePathsPublic()); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | |
127 | 127 | public function testGetPath() |
128 | 128 | { |
129 | - $this->assertEquals( 'attribute', $this->object->getPathPublic() ); |
|
129 | + $this->assertEquals('attribute', $this->object->getPathPublic()); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | |
133 | 133 | public function testCall() |
134 | 134 | { |
135 | - $this->markTestIncomplete( 'PHP warning is triggered instead of exception' ); |
|
135 | + $this->markTestIncomplete('PHP warning is triggered instead of exception'); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | } |
@@ -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,27 +30,27 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'order.datepayment' => '2008-02-15 12:34:56' ) |
|
33 | + '==' => array('order.datepayment' => '2008-02-15 12:34:56') |
|
34 | 34 | ), |
35 | 35 | 'include' => 'order/base,order/status' |
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 | 40 | $header = array(); |
41 | 41 | $status = 500; |
42 | 42 | |
43 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
44 | - |
|
45 | - $this->assertEquals( 200, $status ); |
|
46 | - $this->assertEquals( 1, count( $header ) ); |
|
47 | - $this->assertEquals( 1, $result['meta']['total'] ); |
|
48 | - $this->assertEquals( 1, count( $result['data'] ) ); |
|
49 | - $this->assertEquals( 'order', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 3, count( $result['data'][0]['relationships']['order/status'] ) ); |
|
51 | - $this->assertEquals( 1, count( $result['data'][0]['relationships']['order/base'] ) ); |
|
52 | - $this->assertEquals( 4, count( $result['included'] ) ); |
|
53 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
43 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
44 | + |
|
45 | + $this->assertEquals(200, $status); |
|
46 | + $this->assertEquals(1, count($header)); |
|
47 | + $this->assertEquals(1, $result['meta']['total']); |
|
48 | + $this->assertEquals(1, count($result['data'])); |
|
49 | + $this->assertEquals('order', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(3, count($result['data'][0]['relationships']['order/status'])); |
|
51 | + $this->assertEquals(1, count($result['data'][0]['relationships']['order/base'])); |
|
52 | + $this->assertEquals(4, count($result['included'])); |
|
53 | + $this->assertArrayNotHasKey('errors', $result); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
@@ -63,22 +63,22 @@ discard block |
||
63 | 63 | 'sort' => 'order.id', |
64 | 64 | 'include' => 'order/status' |
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 | 69 | $header = array(); |
70 | 70 | $status = 500; |
71 | 71 | |
72 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
73 | - |
|
74 | - $this->assertEquals( 200, $status ); |
|
75 | - $this->assertEquals( 1, count( $header ) ); |
|
76 | - $this->assertGreaterThanOrEqual( 4, $result['meta']['total'] ); |
|
77 | - $this->assertGreaterThanOrEqual( 4, count( $result['data'] ) ); |
|
78 | - $this->assertEquals( 'order', $result['data'][0]['type'] ); |
|
79 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
80 | - $this->assertGreaterThanOrEqual( 3, count( $result['data'][0]['relationships']['order/status'] ) ); |
|
81 | - $this->assertGreaterThanOrEqual( 11, count( $result['included'] ) ); |
|
82 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
72 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
73 | + |
|
74 | + $this->assertEquals(200, $status); |
|
75 | + $this->assertEquals(1, count($header)); |
|
76 | + $this->assertGreaterThanOrEqual(4, $result['meta']['total']); |
|
77 | + $this->assertGreaterThanOrEqual(4, count($result['data'])); |
|
78 | + $this->assertEquals('order', $result['data'][0]['type']); |
|
79 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
80 | + $this->assertGreaterThanOrEqual(3, count($result['data'][0]['relationships']['order/status'])); |
|
81 | + $this->assertGreaterThanOrEqual(11, 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\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,27 +30,27 @@ 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 | 40 | $header = array(); |
41 | 41 | $status = 500; |
42 | 42 | |
43 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
44 | - |
|
45 | - $this->assertEquals( 200, $status ); |
|
46 | - $this->assertEquals( 1, count( $header ) ); |
|
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 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
43 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
44 | + |
|
45 | + $this->assertEquals(200, $status); |
|
46 | + $this->assertEquals(1, count($header)); |
|
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 | + $this->assertArrayNotHasKey('errors', $result); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
@@ -63,22 +63,22 @@ discard block |
||
63 | 63 | 'sort' => 'order.base.id', |
64 | 64 | 'include' => 'order/base/product' |
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 | 69 | $header = array(); |
70 | 70 | $status = 500; |
71 | 71 | |
72 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
73 | - |
|
74 | - $this->assertEquals( 200, $status ); |
|
75 | - $this->assertEquals( 1, count( $header ) ); |
|
76 | - $this->assertGreaterThanOrEqual( 4, $result['meta']['total'] ); |
|
77 | - $this->assertGreaterThanOrEqual( 4, count( $result['data'] ) ); |
|
78 | - $this->assertEquals( 'order/base', $result['data'][0]['type'] ); |
|
79 | - $this->assertEquals( 2, count( $result['data'][0]['attributes'] ) ); |
|
80 | - $this->assertGreaterThanOrEqual( 4, count( $result['data'][0]['relationships']['order/base/product'] ) ); |
|
81 | - $this->assertGreaterThanOrEqual( 14, count( $result['included'] ) ); |
|
82 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
72 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
73 | + |
|
74 | + $this->assertEquals(200, $status); |
|
75 | + $this->assertEquals(1, count($header)); |
|
76 | + $this->assertGreaterThanOrEqual(4, $result['meta']['total']); |
|
77 | + $this->assertGreaterThanOrEqual(4, count($result['data'])); |
|
78 | + $this->assertEquals('order/base', $result['data'][0]['type']); |
|
79 | + $this->assertEquals(2, count($result['data'][0]['attributes'])); |
|
80 | + $this->assertGreaterThanOrEqual(4, count($result['data'][0]['relationships']['order/base/product'])); |
|
81 | + $this->assertGreaterThanOrEqual(14, 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\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,25 +30,25 @@ 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 | 40 | $header = array(); |
41 | 41 | $status = 500; |
42 | 42 | |
43 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
43 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
44 | 44 | |
45 | - $this->assertEquals( 200, $status ); |
|
46 | - $this->assertEquals( 1, count( $header ) ); |
|
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 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
45 | + $this->assertEquals(200, $status); |
|
46 | + $this->assertEquals(1, count($header)); |
|
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 | + $this->assertArrayNotHasKey('errors', $result); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | \ 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\Media\Standard( $this->context, $this->view, $templatePaths, 'price' ); |
|
25 | + $this->object = new \Aimeos\Admin\JsonAdm\Media\Standard($this->context, $this->view, $templatePaths, 'price'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
@@ -30,25 +30,25 @@ discard block |
||
30 | 30 | { |
31 | 31 | $params = array( |
32 | 32 | 'filter' => array( |
33 | - '==' => array( 'price.value' => '12.95' ) |
|
33 | + '==' => array('price.value' => '12.95') |
|
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 | 40 | $header = array(); |
41 | 41 | $status = 500; |
42 | 42 | |
43 | - $result = json_decode( $this->object->get( '', $header, $status ), true ); |
|
43 | + $result = json_decode($this->object->get('', $header, $status), true); |
|
44 | 44 | |
45 | - $this->assertEquals( 200, $status ); |
|
46 | - $this->assertEquals( 1, count( $header ) ); |
|
47 | - $this->assertEquals( 2, $result['meta']['total'] ); |
|
48 | - $this->assertEquals( 2, count( $result['data'] ) ); |
|
49 | - $this->assertEquals( 'price', $result['data'][0]['type'] ); |
|
50 | - $this->assertEquals( 0, count( $result['data'][0]['relationships'] ) ); |
|
51 | - $this->assertEquals( 0, count( $result['included'] ) ); |
|
52 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
45 | + $this->assertEquals(200, $status); |
|
46 | + $this->assertEquals(1, count($header)); |
|
47 | + $this->assertEquals(2, $result['meta']['total']); |
|
48 | + $this->assertEquals(2, count($result['data'])); |
|
49 | + $this->assertEquals('price', $result['data'][0]['type']); |
|
50 | + $this->assertEquals(0, count($result['data'][0]['relationships'])); |
|
51 | + $this->assertEquals(0, count($result['included'])); |
|
52 | + $this->assertArrayNotHasKey('errors', $result); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | \ No newline at end of file |