@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | $this->context = \TestHelperJadm::getContext(); |
22 | 22 | $this->view = $this->context->getView(); |
23 | 23 | |
24 | - $this->object = new \Aimeos\Admin\JsonAdm\Plugin\Config\Standard( $this->context, 'plugin/config' ); |
|
25 | - $this->object->setAimeos( \TestHelperJadm::getAimeos() ); |
|
26 | - $this->object->setView( $this->view ); |
|
24 | + $this->object = new \Aimeos\Admin\JsonAdm\Plugin\Config\Standard($this->context, 'plugin/config'); |
|
25 | + $this->object->setAimeos(\TestHelperJadm::getAimeos()); |
|
26 | + $this->object->setView($this->view); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | |
@@ -32,26 +32,26 @@ discard block |
||
32 | 32 | $params = array( |
33 | 33 | 'id' => 'Autofill,Log', |
34 | 34 | ); |
35 | - $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $params ); |
|
36 | - $this->view->addHelper( 'param', $helper ); |
|
37 | - |
|
38 | - $response = $this->object->get( $this->view->request(), $this->view->response() ); |
|
39 | - $result = json_decode( (string) $response->getBody(), true ); |
|
40 | - |
|
41 | - $this->assertEquals( 200, $response->getStatusCode() ); |
|
42 | - $this->assertEquals( 1, count( $response->getHeader( 'Content-Type' ) ) ); |
|
43 | - |
|
44 | - $this->assertEquals( 8, $result['meta']['total'] ); |
|
45 | - $this->assertInternalType( 'array', $result['data'] ); |
|
46 | - $this->assertEquals( 'address', $result['data'][0]['id'] ); |
|
47 | - $this->assertEquals( 'delivery', $result['data'][1]['id'] ); |
|
48 | - $this->assertEquals( 'deliverycode', $result['data'][2]['id'] ); |
|
49 | - $this->assertEquals( 'payment', $result['data'][3]['id'] ); |
|
50 | - $this->assertEquals( 'paymentcode', $result['data'][4]['id'] ); |
|
51 | - $this->assertEquals( 'useorder', $result['data'][5]['id'] ); |
|
52 | - $this->assertEquals( 'orderaddress', $result['data'][6]['id'] ); |
|
53 | - $this->assertEquals( 'orderservice', $result['data'][7]['id'] ); |
|
54 | - |
|
55 | - $this->assertArrayNotHasKey( 'errors', $result ); |
|
35 | + $helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $params); |
|
36 | + $this->view->addHelper('param', $helper); |
|
37 | + |
|
38 | + $response = $this->object->get($this->view->request(), $this->view->response()); |
|
39 | + $result = json_decode((string) $response->getBody(), true); |
|
40 | + |
|
41 | + $this->assertEquals(200, $response->getStatusCode()); |
|
42 | + $this->assertEquals(1, count($response->getHeader('Content-Type'))); |
|
43 | + |
|
44 | + $this->assertEquals(8, $result['meta']['total']); |
|
45 | + $this->assertInternalType('array', $result['data']); |
|
46 | + $this->assertEquals('address', $result['data'][0]['id']); |
|
47 | + $this->assertEquals('delivery', $result['data'][1]['id']); |
|
48 | + $this->assertEquals('deliverycode', $result['data'][2]['id']); |
|
49 | + $this->assertEquals('payment', $result['data'][3]['id']); |
|
50 | + $this->assertEquals('paymentcode', $result['data'][4]['id']); |
|
51 | + $this->assertEquals('useorder', $result['data'][5]['id']); |
|
52 | + $this->assertEquals('orderaddress', $result['data'][6]['id']); |
|
53 | + $this->assertEquals('orderservice', $result['data'][7]['id']); |
|
54 | + |
|
55 | + $this->assertArrayNotHasKey('errors', $result); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | \ No newline at end of file |