@@ -5,33 +5,33 @@ |
||
| 5 | 5 | public function setUp() |
| 6 | 6 | { |
| 7 | 7 | parent::setUp(); |
| 8 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
| 8 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | public function testConfirmAction() |
| 13 | 13 | { |
| 14 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CheckoutController@confirmAction', ['site' => 'unittest']); |
|
| 14 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@confirmAction', ['site' => 'unittest'] ); |
|
| 15 | 15 | |
| 16 | 16 | $this->assertResponseOk(); |
| 17 | - $this->assertContains('<section class="aimeos checkout-confirm"', $response->getContent()); |
|
| 17 | + $this->assertContains( '<section class="aimeos checkout-confirm"', $response->getContent() ); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | public function testIndexAction() |
| 22 | 22 | { |
| 23 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CheckoutController@indexAction', ['site' => 'unittest']); |
|
| 23 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@indexAction', ['site' => 'unittest'] ); |
|
| 24 | 24 | |
| 25 | 25 | $this->assertResponseOk(); |
| 26 | - $this->assertContains('<section class="checkout-standard-address"', $response->getContent()); |
|
| 26 | + $this->assertContains( '<section class="checkout-standard-address"', $response->getContent() ); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | |
| 30 | 30 | public function testUpdateAction() |
| 31 | 31 | { |
| 32 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\CheckoutController@updateAction', ['site' => 'unittest'], ['code' => 'paypalexpress']); |
|
| 32 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\CheckoutController@updateAction', ['site' => 'unittest'], ['code' => 'paypalexpress'] ); |
|
| 33 | 33 | |
| 34 | 34 | $this->assertResponseOk(); |
| 35 | - $this->assertEquals('', $response->getContent()); |
|
| 35 | + $this->assertEquals( '', $response->getContent() ); |
|
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | \ No newline at end of file |
@@ -5,32 +5,32 @@ discard block |
||
| 5 | 5 | public function setUp() |
| 6 | 6 | { |
| 7 | 7 | parent::setUp(); |
| 8 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
| 8 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | public function testFileActionCss() |
| 13 | 13 | { |
| 14 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'css']); |
|
| 14 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'css'] ); |
|
| 15 | 15 | |
| 16 | 16 | $this->assertResponseOk(); |
| 17 | - $this->assertContains('.aimeos', $response->getContent()); |
|
| 17 | + $this->assertContains( '.aimeos', $response->getContent() ); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | public function testFileActionJs() |
| 22 | 22 | { |
| 23 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'js']); |
|
| 23 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@fileAction', ['site' => 'unittest', 'type' => 'js'] ); |
|
| 24 | 24 | |
| 25 | 25 | $this->assertResponseOk(); |
| 26 | - $this->assertContains('Aimeos = {', $response->getContent()); |
|
| 26 | + $this->assertContains( 'Aimeos = {', $response->getContent() ); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | |
| 30 | 30 | public function testCopyAction() |
| 31 | 31 | { |
| 32 | 32 | $params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0']; |
| 33 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@copyAction', $params); |
|
| 33 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@copyAction', $params ); |
|
| 34 | 34 | |
| 35 | 35 | $this->assertEquals( 200, $response->getStatusCode() ); |
| 36 | 36 | $this->assertContains( 'item-product', $response->getContent() ); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | public function testCreateAction() |
| 41 | 41 | { |
| 42 | 42 | $params = ['site' => 'unittest', 'resource' => 'product']; |
| 43 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@createAction', $params); |
|
| 43 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@createAction', $params ); |
|
| 44 | 44 | |
| 45 | 45 | $this->assertEquals( 200, $response->getStatusCode() ); |
| 46 | 46 | $this->assertContains( 'item-product', $response->getContent() ); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | public function testDeleteAction() |
| 51 | 51 | { |
| 52 | 52 | $params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0']; |
| 53 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@deleteAction', $params); |
|
| 53 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@deleteAction', $params ); |
|
| 54 | 54 | |
| 55 | 55 | $this->assertEquals( 200, $response->getStatusCode() ); |
| 56 | 56 | $this->assertContains( 'list-items', $response->getContent() ); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | public function testExportAction() |
| 61 | 61 | { |
| 62 | 62 | $params = ['site' => 'unittest', 'resource' => 'order']; |
| 63 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@exportAction', $params); |
|
| 63 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@exportAction', $params ); |
|
| 64 | 64 | |
| 65 | 65 | $this->assertEquals( 200, $response->getStatusCode() ); |
| 66 | 66 | $this->assertContains( 'list-items', $response->getContent() ); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | public function testGetAction() |
| 71 | 71 | { |
| 72 | 72 | $params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0']; |
| 73 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@getAction', $params); |
|
| 73 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@getAction', $params ); |
|
| 74 | 74 | |
| 75 | 75 | $this->assertEquals( 200, $response->getStatusCode() ); |
| 76 | 76 | $this->assertContains( 'item-product', $response->getContent() ); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | public function testSaveAction() |
| 81 | 81 | { |
| 82 | 82 | $params = ['site' => 'unittest', 'resource' => 'product', 'id' => '0']; |
| 83 | - $response = $this->action('POST', '\Aimeos\Shop\Controller\JqadmController@saveAction', $params); |
|
| 83 | + $response = $this->action( 'POST', '\Aimeos\Shop\Controller\JqadmController@saveAction', $params ); |
|
| 84 | 84 | |
| 85 | 85 | $this->assertEquals( 200, $response->getStatusCode() ); |
| 86 | 86 | $this->assertContains( 'item-product', $response->getContent() ); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | public function testSearchAction() |
| 91 | 91 | { |
| 92 | 92 | $params = ['site' => 'unittest', 'resource' => 'product']; |
| 93 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params); |
|
| 93 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params ); |
|
| 94 | 94 | |
| 95 | 95 | $this->assertEquals( 200, $response->getStatusCode() ); |
| 96 | 96 | $this->assertContains( 'list-items', $response->getContent() ); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | public function testSearchActionSite() |
| 101 | 101 | { |
| 102 | 102 | $params = ['site' => 'invalid', 'resource' => 'product']; |
| 103 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params); |
|
| 103 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JqadmController@searchAction', $params ); |
|
| 104 | 104 | |
| 105 | 105 | $this->assertEquals( 500, $response->getStatusCode() ); |
| 106 | 106 | } |
@@ -5,25 +5,25 @@ |
||
| 5 | 5 | public function setUp() |
| 6 | 6 | { |
| 7 | 7 | parent::setUp(); |
| 8 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
| 8 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | public function testActions() |
| 13 | 13 | { |
| 14 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\AccountController@indexAction', ['site' => 'unittest']); |
|
| 14 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\AccountController@indexAction', ['site' => 'unittest'] ); |
|
| 15 | 15 | |
| 16 | 16 | $this->assertResponseOk(); |
| 17 | - $this->assertContains('<section class="aimeos account-profile"', $response->getContent()); |
|
| 18 | - $this->assertContains('<section class="aimeos account-history"', $response->getContent()); |
|
| 19 | - $this->assertContains('<section class="aimeos account-favorite"', $response->getContent()); |
|
| 20 | - $this->assertContains('<section class="aimeos account-watch"', $response->getContent()); |
|
| 17 | + $this->assertContains( '<section class="aimeos account-profile"', $response->getContent() ); |
|
| 18 | + $this->assertContains( '<section class="aimeos account-history"', $response->getContent() ); |
|
| 19 | + $this->assertContains( '<section class="aimeos account-favorite"', $response->getContent() ); |
|
| 20 | + $this->assertContains( '<section class="aimeos account-watch"', $response->getContent() ); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | |
| 24 | 24 | public function testDownload() |
| 25 | 25 | { |
| 26 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\AccountController@downloadAction', ['site' => 'unittest', 'dl_id' => 0]); |
|
| 26 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\AccountController@downloadAction', ['site' => 'unittest', 'dl_id' => 0] ); |
|
| 27 | 27 | |
| 28 | 28 | $this->assertEquals( 401, $response->getStatusCode() ); |
| 29 | 29 | } |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | { |
| 5 | 5 | public function testIndexAction() |
| 6 | 6 | { |
| 7 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\AdminController@indexAction'); |
|
| 7 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\AdminController@indexAction' ); |
|
| 8 | 8 | |
| 9 | 9 | $this->assertEquals( '302', $response->getStatusCode() ); |
| 10 | 10 | } |
@@ -5,14 +5,14 @@ discard block |
||
| 5 | 5 | public function setUp() |
| 6 | 6 | { |
| 7 | 7 | parent::setUp(); |
| 8 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
| 8 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | public function testOptionsAction() |
| 13 | 13 | { |
| 14 | 14 | $params = ['site' => 'unittest']; |
| 15 | - $response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonapiController@optionsAction', $params); |
|
| 15 | + $response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonapiController@optionsAction', $params ); |
|
| 16 | 16 | |
| 17 | 17 | $json = json_decode( $response->getContent(), true ); |
| 18 | 18 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $params = ['site' => 'unittest', 'resource' => 'product']; |
| 29 | 29 | $getParams = ['filter' => ['f_search' => 'Cafe Noire Cap']]; |
| 30 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams); |
|
| 30 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams ); |
|
| 31 | 31 | |
| 32 | 32 | $json = json_decode( $response->getContent(), true ); |
| 33 | 33 | |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | $id = $json['data'][0]['id']; |
| 42 | 42 | |
| 43 | 43 | |
| 44 | - $params = ['site' => 'unittest', 'resource' => 'product', 'id' => $id ]; |
|
| 45 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params); |
|
| 44 | + $params = ['site' => 'unittest', 'resource' => 'product', 'id' => $id]; |
|
| 45 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params ); |
|
| 46 | 46 | |
| 47 | 47 | $json = json_decode( $response->getContent(), true ); |
| 48 | 48 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | // get CNC product |
| 60 | 60 | $params = ['site' => 'unittest', 'resource' => 'product']; |
| 61 | 61 | $getParams = ['filter' => ['f_search' => 'Cafe Noire Cap', 'f_listtype' => 'unittype19']]; |
| 62 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams); |
|
| 62 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonapiController@getAction', $params, $getParams ); |
|
| 63 | 63 | |
| 64 | 64 | $json = json_decode( $response->getContent(), true ); |
| 65 | 65 | $this->assertEquals( 'CNC', $json['data'][0]['attributes']['product.code'] ); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | // add CNC product to basket |
| 68 | 68 | $params = ['site' => 'unittest', 'resource' => 'basket', 'id' => 'default', 'related' => 'product']; |
| 69 | 69 | $content = json_encode( ['data' => ['attributes' => ['product.id' => $json['data'][0]['id']]]] ); |
| 70 | - $response = $this->action('POST', '\Aimeos\Shop\Controller\JsonapiController@postAction', $params, [], [], [], [], $content); |
|
| 70 | + $response = $this->action( 'POST', '\Aimeos\Shop\Controller\JsonapiController@postAction', $params, [], [], [], [], $content ); |
|
| 71 | 71 | |
| 72 | 72 | $json = json_decode( $response->getContent(), true ); |
| 73 | 73 | $this->assertEquals( 'CNC', $json['included'][0]['attributes']['order.base.product.prodcode'] ); |
@@ -75,14 +75,14 @@ discard block |
||
| 75 | 75 | // change product quantity in basket |
| 76 | 76 | $params = ['site' => 'unittest', 'resource' => 'basket', 'id' => 'default', 'related' => 'product', 'relatedid' => 0]; |
| 77 | 77 | $content = json_encode( ['data' => ['attributes' => ['quantity' => 2]]] ); |
| 78 | - $response = $this->action('PATCH', '\Aimeos\Shop\Controller\JsonapiController@patchAction', $params, [], [], [], [], $content); |
|
| 78 | + $response = $this->action( 'PATCH', '\Aimeos\Shop\Controller\JsonapiController@patchAction', $params, [], [], [], [], $content ); |
|
| 79 | 79 | |
| 80 | 80 | $json = json_decode( $response->getContent(), true ); |
| 81 | 81 | $this->assertEquals( 2, $json['included'][0]['attributes']['order.base.product.quantity'] ); |
| 82 | 82 | |
| 83 | 83 | // delete product from basket |
| 84 | 84 | $params = ['site' => 'unittest', 'resource' => 'basket', 'id' => 'default', 'related' => 'product', 'relatedid' => 0]; |
| 85 | - $response = $this->action('DELETE', '\Aimeos\Shop\Controller\JsonapiController@deleteAction', $params); |
|
| 85 | + $response = $this->action( 'DELETE', '\Aimeos\Shop\Controller\JsonapiController@deleteAction', $params ); |
|
| 86 | 86 | |
| 87 | 87 | $json = json_decode( $response->getContent(), true ); |
| 88 | 88 | $this->assertEquals( 0, count( $json['included'] ) ); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | public function testPutAction() |
| 93 | 93 | { |
| 94 | 94 | $params = ['site' => 'unittest', 'resource' => 'basket']; |
| 95 | - $response = $this->action('PUT', '\Aimeos\Shop\Controller\JsonapiController@putAction', $params); |
|
| 95 | + $response = $this->action( 'PUT', '\Aimeos\Shop\Controller\JsonapiController@putAction', $params ); |
|
| 96 | 96 | |
| 97 | 97 | $json = json_decode( $response->getContent(), true ); |
| 98 | 98 | $this->assertArrayHasKey( 'errors', $json ); |
@@ -5,20 +5,20 @@ |
||
| 5 | 5 | public function setUp() |
| 6 | 6 | { |
| 7 | 7 | parent::setUp(); |
| 8 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
| 8 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | public function testPrivacyAction() |
| 13 | 13 | { |
| 14 | - $this->action('GET', '\Aimeos\Shop\Controller\PageController@privacyAction', ['site' => 'unittest']); |
|
| 14 | + $this->action( 'GET', '\Aimeos\Shop\Controller\PageController@privacyAction', ['site' => 'unittest'] ); |
|
| 15 | 15 | $this->assertResponseOk(); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | |
| 19 | 19 | public function testTermsAction() |
| 20 | 20 | { |
| 21 | - $this->action('GET', '\Aimeos\Shop\Controller\PageController@termsAction', ['site' => 'unittest']); |
|
| 21 | + $this->action( 'GET', '\Aimeos\Shop\Controller\PageController@termsAction', ['site' => 'unittest'] ); |
|
| 22 | 22 | $this->assertResponseOk(); |
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | \ No newline at end of file |
@@ -5,14 +5,14 @@ discard block |
||
| 5 | 5 | public function setUp() |
| 6 | 6 | { |
| 7 | 7 | parent::setUp(); |
| 8 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
| 8 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | public function testOptionsActionSite() |
| 13 | 13 | { |
| 14 | 14 | $params = ['site' => 'invalid', 'resource' => 'product']; |
| 15 | - $response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params); |
|
| 15 | + $response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params ); |
|
| 16 | 16 | |
| 17 | 17 | $json = json_decode( $response->getContent(), true ); |
| 18 | 18 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public function testOptionsAction() |
| 25 | 25 | { |
| 26 | 26 | $params = ['site' => 'unittest', 'resource' => 'product']; |
| 27 | - $response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params); |
|
| 27 | + $response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params ); |
|
| 28 | 28 | |
| 29 | 29 | $json = json_decode( $response->getContent(), true ); |
| 30 | 30 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | |
| 37 | 37 | $params = ['site' => 'unittest']; |
| 38 | - $response = $this->action('OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params); |
|
| 38 | + $response = $this->action( 'OPTIONS', '\Aimeos\Shop\Controller\JsonadmController@optionsAction', $params ); |
|
| 39 | 39 | |
| 40 | 40 | $json = json_decode( $response->getContent(), true ); |
| 41 | 41 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | $params = ['site' => 'unittest', 'resource' => 'stock/type']; |
| 52 | 52 | $content = '{"data":{"type":"stock/type","attributes":{"stock.type.code":"laravel","stock.type.label":"laravel"}}}'; |
| 53 | - $response = $this->action('POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content); |
|
| 53 | + $response = $this->action( 'POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content ); |
|
| 54 | 54 | |
| 55 | 55 | $json = json_decode( $response->getContent(), true ); |
| 56 | 56 | |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | $id = $json['data']['attributes']['stock.type.id']; |
| 65 | 65 | |
| 66 | 66 | |
| 67 | - $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id ]; |
|
| 67 | + $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id]; |
|
| 68 | 68 | $content = '{"data":{"type":"stock/type","attributes":{"stock.type.code":"laravel2","stock.type.label":"laravel2"}}}'; |
| 69 | - $response = $this->action('PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content); |
|
| 69 | + $response = $this->action( 'PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content ); |
|
| 70 | 70 | |
| 71 | 71 | $json = json_decode( $response->getContent(), true ); |
| 72 | 72 | |
@@ -79,8 +79,8 @@ discard block |
||
| 79 | 79 | $this->assertEquals( 1, $json['meta']['total'] ); |
| 80 | 80 | |
| 81 | 81 | |
| 82 | - $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id ]; |
|
| 83 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params); |
|
| 82 | + $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id]; |
|
| 83 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params ); |
|
| 84 | 84 | |
| 85 | 85 | $json = json_decode( $response->getContent(), true ); |
| 86 | 86 | |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | $this->assertEquals( 1, $json['meta']['total'] ); |
| 94 | 94 | |
| 95 | 95 | |
| 96 | - $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id ]; |
|
| 97 | - $response = $this->action('DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params); |
|
| 96 | + $params = ['site' => 'unittest', 'resource' => 'stock/type', 'id' => $id]; |
|
| 97 | + $response = $this->action( 'DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params ); |
|
| 98 | 98 | |
| 99 | 99 | $json = json_decode( $response->getContent(), true ); |
| 100 | 100 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | {"type":"stock/type","attributes":{"stock.type.code":"laravel","stock.type.label":"laravel"}}, |
| 112 | 112 | {"type":"stock/type","attributes":{"stock.type.code":"laravel2","stock.type.label":"laravel"}} |
| 113 | 113 | ]}'; |
| 114 | - $response = $this->action('POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content); |
|
| 114 | + $response = $this->action( 'POST', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content ); |
|
| 115 | 115 | |
| 116 | 116 | $json = json_decode( $response->getContent(), true ); |
| 117 | 117 | |
@@ -127,12 +127,12 @@ discard block |
||
| 127 | 127 | $ids = array( $json['data'][0]['attributes']['stock.type.id'], $json['data'][1]['attributes']['stock.type.id'] ); |
| 128 | 128 | |
| 129 | 129 | |
| 130 | - $params = ['site' => 'unittest', 'resource' => 'stock/type' ]; |
|
| 130 | + $params = ['site' => 'unittest', 'resource' => 'stock/type']; |
|
| 131 | 131 | $content = '{"data":[ |
| 132 | 132 | {"type":"stock/type","id":' . $ids[0] . ',"attributes":{"stock.type.label":"laravel2"}}, |
| 133 | 133 | {"type":"stock/type","id":' . $ids[1] . ',"attributes":{"stock.type.label":"laravel2"}} |
| 134 | 134 | ]}'; |
| 135 | - $response = $this->action('PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content); |
|
| 135 | + $response = $this->action( 'PATCH', '\Aimeos\Shop\Controller\JsonadmController@patchAction', $params, [], [], [], [], $content ); |
|
| 136 | 136 | |
| 137 | 137 | $json = json_decode( $response->getContent(), true ); |
| 138 | 138 | |
@@ -148,14 +148,14 @@ discard block |
||
| 148 | 148 | $this->assertEquals( 2, $json['meta']['total'] ); |
| 149 | 149 | |
| 150 | 150 | |
| 151 | - $params = ['site' => 'unittest', 'resource' => 'stock/type' ]; |
|
| 151 | + $params = ['site' => 'unittest', 'resource' => 'stock/type']; |
|
| 152 | 152 | $getParams = ['filter' => ['&&' => [ |
| 153 | 153 | ['=~' => ['stock.type.code' => 'laravel']], |
| 154 | 154 | ['==' => ['stock.type.label' => 'laravel2']] |
| 155 | 155 | ]], |
| 156 | 156 | 'sort' => 'stock.type.code', 'page' => ['offset' => 0, 'limit' => 3] |
| 157 | 157 | ]; |
| 158 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params, $getParams); |
|
| 158 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\JsonadmController@getAction', $params, $getParams ); |
|
| 159 | 159 | |
| 160 | 160 | $json = json_decode( $response->getContent(), true ); |
| 161 | 161 | |
@@ -171,12 +171,12 @@ discard block |
||
| 171 | 171 | $this->assertEquals( 2, $json['meta']['total'] ); |
| 172 | 172 | |
| 173 | 173 | |
| 174 | - $params = ['site' => 'unittest', 'resource' => 'stock/type' ]; |
|
| 174 | + $params = ['site' => 'unittest', 'resource' => 'stock/type']; |
|
| 175 | 175 | $content = '{"data":[ |
| 176 | 176 | {"type":"stock/type","id":' . $ids[0] . '}, |
| 177 | 177 | {"type":"stock/type","id":' . $ids[1] . '} |
| 178 | 178 | ]}'; |
| 179 | - $response = $this->action('DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params, [], [], [], [], $content); |
|
| 179 | + $response = $this->action( 'DELETE', '\Aimeos\Shop\Controller\JsonadmController@deleteAction', $params, [], [], [], [], $content ); |
|
| 180 | 180 | |
| 181 | 181 | $json = json_decode( $response->getContent(), true ); |
| 182 | 182 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | {"type":"stock/type","attributes":{"stock.type.code":"laravel","stock.type.label":"laravel"}}, |
| 194 | 194 | {"type":"stock/type","attributes":{"stock.type.code":"laravel2","stock.type.label":"laravel"}} |
| 195 | 195 | ]}'; |
| 196 | - $response = $this->action('PUT', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content); |
|
| 196 | + $response = $this->action( 'PUT', '\Aimeos\Shop\Controller\JsonadmController@postAction', $params, [], [], [], [], $content ); |
|
| 197 | 197 | |
| 198 | 198 | $json = json_decode( $response->getContent(), true ); |
| 199 | 199 | |
@@ -5,16 +5,16 @@ |
||
| 5 | 5 | public function setUp() |
| 6 | 6 | { |
| 7 | 7 | parent::setUp(); |
| 8 | - View::addLocation(dirname(__DIR__).'/fixtures/views'); |
|
| 8 | + View::addLocation( dirname( __DIR__ ) . '/fixtures/views' ); |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | public function testActions() |
| 13 | 13 | { |
| 14 | - $response = $this->action('GET', '\Aimeos\Shop\Controller\BasketController@indexAction', ['site' => 'unittest']); |
|
| 14 | + $response = $this->action( 'GET', '\Aimeos\Shop\Controller\BasketController@indexAction', ['site' => 'unittest'] ); |
|
| 15 | 15 | |
| 16 | 16 | $this->assertResponseOk(); |
| 17 | - $this->assertContains('<section class="aimeos basket-standard"', $response->getContent()); |
|
| 18 | - $this->assertContains('<section class="aimeos basket-related"', $response->getContent()); |
|
| 17 | + $this->assertContains( '<section class="aimeos basket-standard"', $response->getContent() ); |
|
| 18 | + $this->assertContains( '<section class="aimeos basket-related"', $response->getContent() ); |
|
| 19 | 19 | } |
| 20 | 20 | } |
| 21 | 21 | \ No newline at end of file |
@@ -4,15 +4,15 @@ |
||
| 4 | 4 | { |
| 5 | 5 | public function testGet() |
| 6 | 6 | { |
| 7 | - $aimeos = $this->app->make('\Aimeos\Shop\Base\Aimeos'); |
|
| 7 | + $aimeos = $this->app->make( '\Aimeos\Shop\Base\Aimeos' ); |
|
| 8 | 8 | |
| 9 | - $configMock = $this->getMockBuilder('\Illuminate\Config\Repository') |
|
| 10 | - ->setMethods( array('get') )->getMock(); |
|
| 9 | + $configMock = $this->getMockBuilder( '\Illuminate\Config\Repository' ) |
|
| 10 | + ->setMethods( array( 'get' ) )->getMock(); |
|
| 11 | 11 | |
| 12 | - $configMock->expects( $this->exactly(4) )->method('get') |
|
| 12 | + $configMock->expects( $this->exactly( 4 ) )->method( 'get' ) |
|
| 13 | 13 | ->will( $this->onConsecutiveCalls( true, 'laravel:', array(), array() ) ); |
| 14 | 14 | |
| 15 | - $object = new \Aimeos\Shop\Base\Config($configMock, $aimeos); |
|
| 15 | + $object = new \Aimeos\Shop\Base\Config( $configMock, $aimeos ); |
|
| 16 | 16 | |
| 17 | 17 | $this->assertInstanceOf( '\Aimeos\MW\Config\Iface', $object->get() ); |
| 18 | 18 | } |