@@ -17,144 +17,144 @@ |
||
17 | 17 | |
18 | 18 | public function testGetId() |
19 | 19 | { |
20 | - $this->assertEquals( null, $this->object->getId() ); |
|
20 | + $this->assertEquals(null, $this->object->getId()); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | |
24 | 24 | public function testGetSetCompany() |
25 | 25 | { |
26 | - $this->object->setCompany( 'ABC' ); |
|
27 | - $this->assertEquals( 'ABC', $this->object->getCompany() ); |
|
26 | + $this->object->setCompany('ABC'); |
|
27 | + $this->assertEquals('ABC', $this->object->getCompany()); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | |
31 | 31 | public function testGetSetVatID() |
32 | 32 | { |
33 | - $this->object->setVatID( 'AT0000' ); |
|
34 | - $this->assertEquals( 'AT0000', $this->object->getVatID() ); |
|
33 | + $this->object->setVatID('AT0000'); |
|
34 | + $this->assertEquals('AT0000', $this->object->getVatID()); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
38 | 38 | public function testGetSetSalutation() |
39 | 39 | { |
40 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN ); |
|
41 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN, $this->object->getSalutation() ); |
|
40 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN); |
|
41 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN, $this->object->getSalutation()); |
|
42 | 42 | |
43 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY ); |
|
44 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY, $this->object->getSalutation() ); |
|
43 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY); |
|
44 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY, $this->object->getSalutation()); |
|
45 | 45 | |
46 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS ); |
|
47 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS, $this->object->getSalutation() ); |
|
46 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS); |
|
47 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS, $this->object->getSalutation()); |
|
48 | 48 | |
49 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS ); |
|
50 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS, $this->object->getSalutation() ); |
|
49 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS); |
|
50 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS, $this->object->getSalutation()); |
|
51 | 51 | |
52 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR ); |
|
53 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR, $this->object->getSalutation() ); |
|
52 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR); |
|
53 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR, $this->object->getSalutation()); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
57 | 57 | public function testGetSetTitle() |
58 | 58 | { |
59 | - $this->object->setTitle( 'Prof. Dr.' ); |
|
60 | - $this->assertEquals( 'Prof. Dr.', $this->object->getTitle() ); |
|
59 | + $this->object->setTitle('Prof. Dr.'); |
|
60 | + $this->assertEquals('Prof. Dr.', $this->object->getTitle()); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | |
64 | 64 | public function testGetSetFirstname() |
65 | 65 | { |
66 | - $this->object->setFirstname( 'first' ); |
|
67 | - $this->assertEquals( 'first', $this->object->getFirstname() ); |
|
66 | + $this->object->setFirstname('first'); |
|
67 | + $this->assertEquals('first', $this->object->getFirstname()); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | |
71 | 71 | public function testGetSetLastname() |
72 | 72 | { |
73 | - $this->object->setLastname( 'last' ); |
|
74 | - $this->assertEquals( 'last', $this->object->getLastname() ); |
|
73 | + $this->object->setLastname('last'); |
|
74 | + $this->assertEquals('last', $this->object->getLastname()); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | |
78 | 78 | public function testGetSetAddress1() |
79 | 79 | { |
80 | - $this->object->setAddress1( 'test street' ); |
|
81 | - $this->assertEquals( 'test street', $this->object->getAddress1() ); |
|
80 | + $this->object->setAddress1('test street'); |
|
81 | + $this->assertEquals('test street', $this->object->getAddress1()); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | |
85 | 85 | public function testGetSetAddress2() |
86 | 86 | { |
87 | - $this->object->setAddress2( '1' ); |
|
88 | - $this->assertEquals( '1', $this->object->getAddress2() ); |
|
87 | + $this->object->setAddress2('1'); |
|
88 | + $this->assertEquals('1', $this->object->getAddress2()); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | |
92 | 92 | public function testGetSetAddress3() |
93 | 93 | { |
94 | - $this->object->setAddress3( 'EG' ); |
|
95 | - $this->assertEquals( 'EG', $this->object->getAddress3() ); |
|
94 | + $this->object->setAddress3('EG'); |
|
95 | + $this->assertEquals('EG', $this->object->getAddress3()); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | |
99 | 99 | public function testGetSetPostal() |
100 | 100 | { |
101 | - $this->object->setPostal( '12345' ); |
|
102 | - $this->assertEquals( '12345', $this->object->getPostal() ); |
|
101 | + $this->object->setPostal('12345'); |
|
102 | + $this->assertEquals('12345', $this->object->getPostal()); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | |
106 | 106 | public function testGetSetCity() |
107 | 107 | { |
108 | - $this->object->setCity( 'Munich' ); |
|
109 | - $this->assertEquals( 'Munich', $this->object->getCity() ); |
|
108 | + $this->object->setCity('Munich'); |
|
109 | + $this->assertEquals('Munich', $this->object->getCity()); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | |
113 | 113 | public function testGetSetState() |
114 | 114 | { |
115 | - $this->object->setState( 'Bayern' ); |
|
116 | - $this->assertEquals( 'Bayern', $this->object->getState() ); |
|
115 | + $this->object->setState('Bayern'); |
|
116 | + $this->assertEquals('Bayern', $this->object->getState()); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | |
120 | 120 | public function testGetSetCountryId() |
121 | 121 | { |
122 | - $this->object->setCountryId( 'DE' ); |
|
123 | - $this->assertEquals( 'DE', $this->object->getCountryId() ); |
|
122 | + $this->object->setCountryId('DE'); |
|
123 | + $this->assertEquals('DE', $this->object->getCountryId()); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | |
127 | 127 | public function testGetSetLanguageId() |
128 | 128 | { |
129 | - $this->object->setLanguageId( 'de' ); |
|
130 | - $this->assertEquals( 'de', $this->object->getLanguageId() ); |
|
129 | + $this->object->setLanguageId('de'); |
|
130 | + $this->assertEquals('de', $this->object->getLanguageId()); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | |
134 | 134 | public function testGetSetTelephone() |
135 | 135 | { |
136 | - $this->object->setTelephone( '089123456789' ); |
|
137 | - $this->assertEquals( '089123456789', $this->object->getTelephone() ); |
|
136 | + $this->object->setTelephone('089123456789'); |
|
137 | + $this->assertEquals('089123456789', $this->object->getTelephone()); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | |
141 | 141 | public function testGetSetTelefax() |
142 | 142 | { |
143 | - $this->object->setTelefax( '089987654321' ); |
|
144 | - $this->assertEquals( '089987654321', $this->object->getTelefax() ); |
|
143 | + $this->object->setTelefax('089987654321'); |
|
144 | + $this->assertEquals('089987654321', $this->object->getTelefax()); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | |
148 | 148 | public function testGetSetWebsite() |
149 | 149 | { |
150 | - $this->object->setWebsite( 'http://aimeos.org' ); |
|
151 | - $this->assertEquals( 'http://aimeos.org', $this->object->getWebsite() ); |
|
150 | + $this->object->setWebsite('http://aimeos.org'); |
|
151 | + $this->assertEquals('http://aimeos.org', $this->object->getWebsite()); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | |
155 | 155 | public function testSetWebsiteInvalid() |
156 | 156 | { |
157 | - $this->setExpectedException( 'Exception' ); |
|
158 | - $this->object->setWebsite( 'aimeos+org' ); |
|
157 | + $this->setExpectedException('Exception'); |
|
158 | + $this->object->setWebsite('aimeos+org'); |
|
159 | 159 | } |
160 | 160 | } |
@@ -11,17 +11,17 @@ discard block |
||
11 | 11 | { |
12 | 12 | $client = static::createClient(); |
13 | 13 | |
14 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
14 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
15 | 15 | |
16 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link(); |
|
17 | - $crawler = $client->click( $link ); |
|
16 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link(); |
|
17 | + $crawler = $client->click($link); |
|
18 | 18 | |
19 | - $form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form(); |
|
20 | - $crawler = $client->submit( $form ); |
|
19 | + $form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form(); |
|
20 | + $crawler = $client->submit($form); |
|
21 | 21 | |
22 | - $this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() ); |
|
23 | - $this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() ); |
|
24 | - $this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr('value') ); |
|
22 | + $this->assertEquals(1, $crawler->filter('.basket-standard')->count()); |
|
23 | + $this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count()); |
|
24 | + $this->assertEquals(1, $crawler->filter('.basket .product .quantity .value')->attr('value')); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
@@ -29,18 +29,18 @@ discard block |
||
29 | 29 | { |
30 | 30 | $client = static::createClient(); |
31 | 31 | |
32 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
32 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
33 | 33 | |
34 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link(); |
|
35 | - $crawler = $client->click( $link ); |
|
34 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link(); |
|
35 | + $crawler = $client->click($link); |
|
36 | 36 | |
37 | - $form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form(); |
|
37 | + $form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form(); |
|
38 | 38 | $form['b_prod[0][quantity]'] = 2; |
39 | - $crawler = $client->submit( $form ); |
|
39 | + $crawler = $client->submit($form); |
|
40 | 40 | |
41 | - $this->assertEquals( 1, $crawler->filter( '.basket-standard' )->count() ); |
|
42 | - $this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() ); |
|
43 | - $this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr('value') ); |
|
41 | + $this->assertEquals(1, $crawler->filter('.basket-standard')->count()); |
|
42 | + $this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count()); |
|
43 | + $this->assertEquals(2, $crawler->filter('.basket .product .quantity .value')->attr('value')); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
@@ -48,26 +48,26 @@ discard block |
||
48 | 48 | { |
49 | 49 | $client = static::createClient(); |
50 | 50 | |
51 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
51 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
52 | 52 | |
53 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link(); |
|
54 | - $crawler = $client->click( $link ); |
|
53 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link(); |
|
54 | + $crawler = $client->click($link); |
|
55 | 55 | |
56 | - $form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form(); |
|
57 | - $crawler = $client->submit( $form ); |
|
56 | + $form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form(); |
|
57 | + $crawler = $client->submit($form); |
|
58 | 58 | |
59 | - $this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() ); |
|
60 | - $this->assertEquals( 1, $crawler->filter( '.basket .product .quantity .value' )->attr('value') ); |
|
59 | + $this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count()); |
|
60 | + $this->assertEquals(1, $crawler->filter('.basket .product .quantity .value')->attr('value')); |
|
61 | 61 | |
62 | 62 | |
63 | - $link = $crawler->filter( '.basket-standard .btn-back' )->link(); |
|
64 | - $crawler = $client->click( $link ); |
|
63 | + $link = $crawler->filter('.basket-standard .btn-back')->link(); |
|
64 | + $crawler = $client->click($link); |
|
65 | 65 | |
66 | - $form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form(); |
|
67 | - $crawler = $client->submit( $form ); |
|
66 | + $form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form(); |
|
67 | + $crawler = $client->submit($form); |
|
68 | 68 | |
69 | - $this->assertEquals( 1, $crawler->filter( '.basket:contains("Unittest: Bundle")' )->count() ); |
|
70 | - $this->assertEquals( 2, $crawler->filter( '.basket .product .quantity .value' )->attr('value') ); |
|
69 | + $this->assertEquals(1, $crawler->filter('.basket:contains("Unittest: Bundle")')->count()); |
|
70 | + $this->assertEquals(2, $crawler->filter('.basket .product .quantity .value')->attr('value')); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | |
@@ -75,19 +75,19 @@ discard block |
||
75 | 75 | { |
76 | 76 | $client = static::createClient(); |
77 | 77 | |
78 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
78 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
79 | 79 | |
80 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link(); |
|
81 | - $crawler = $client->click( $link ); |
|
80 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link(); |
|
81 | + $crawler = $client->click($link); |
|
82 | 82 | |
83 | - $form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form(); |
|
84 | - $crawler = $client->submit( $form ); |
|
83 | + $form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form(); |
|
84 | + $crawler = $client->submit($form); |
|
85 | 85 | |
86 | 86 | |
87 | - $link = $crawler->filter( '.basket-standard .product .action .change' )->link(); |
|
88 | - $crawler = $client->click( $link ); |
|
87 | + $link = $crawler->filter('.basket-standard .product .action .change')->link(); |
|
88 | + $crawler = $client->click($link); |
|
89 | 89 | |
90 | - $this->assertEquals( 0, $crawler->filter( '.basket-standard .product' )->count() ); |
|
90 | + $this->assertEquals(0, $crawler->filter('.basket-standard .product')->count()); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | |
@@ -95,25 +95,25 @@ discard block |
||
95 | 95 | { |
96 | 96 | $client = static::createClient(); |
97 | 97 | |
98 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
98 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
99 | 99 | |
100 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link(); |
|
101 | - $crawler = $client->click( $link ); |
|
100 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link(); |
|
101 | + $crawler = $client->click($link); |
|
102 | 102 | |
103 | - $form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form(); |
|
104 | - $crawler = $client->submit( $form ); |
|
103 | + $form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form(); |
|
104 | + $crawler = $client->submit($form); |
|
105 | 105 | |
106 | 106 | |
107 | - $link = $crawler->filter( '.basket-standard .product .quantity .change' )->link(); |
|
108 | - $crawler = $client->click( $link ); |
|
107 | + $link = $crawler->filter('.basket-standard .product .quantity .change')->link(); |
|
108 | + $crawler = $client->click($link); |
|
109 | 109 | |
110 | - $this->assertEquals( 2, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) ); |
|
110 | + $this->assertEquals(2, $crawler->filter('.basket-standard .product .quantity .value')->attr('value')); |
|
111 | 111 | |
112 | 112 | |
113 | - $link = $crawler->filter( '.basket-standard .product .quantity .change' )->eq( 0 )->link(); |
|
114 | - $crawler = $client->click( $link ); |
|
113 | + $link = $crawler->filter('.basket-standard .product .quantity .change')->eq(0)->link(); |
|
114 | + $crawler = $client->click($link); |
|
115 | 115 | |
116 | - $this->assertEquals( 1, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) ); |
|
116 | + $this->assertEquals(1, $crawler->filter('.basket-standard .product .quantity .value')->attr('value')); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | |
@@ -121,20 +121,20 @@ discard block |
||
121 | 121 | { |
122 | 122 | $client = static::createClient(); |
123 | 123 | |
124 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
124 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
125 | 125 | |
126 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link(); |
|
127 | - $crawler = $client->click( $link ); |
|
126 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link(); |
|
127 | + $crawler = $client->click($link); |
|
128 | 128 | |
129 | - $form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form(); |
|
130 | - $crawler = $client->submit( $form ); |
|
129 | + $form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form(); |
|
130 | + $crawler = $client->submit($form); |
|
131 | 131 | |
132 | 132 | |
133 | - $form = $crawler->filter( '.basket-standard .btn-update' )->form(); |
|
133 | + $form = $crawler->filter('.basket-standard .btn-update')->form(); |
|
134 | 134 | $form['b_prod[0][quantity]'] = 3; |
135 | - $crawler = $client->submit( $form ); |
|
135 | + $crawler = $client->submit($form); |
|
136 | 136 | |
137 | - $this->assertEquals( 3, $crawler->filter( '.basket-standard .product .quantity .value' )->attr( 'value' ) ); |
|
137 | + $this->assertEquals(3, $crawler->filter('.basket-standard .product .quantity .value')->attr('value')); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | |
@@ -142,26 +142,26 @@ discard block |
||
142 | 142 | { |
143 | 143 | $client = static::createClient(); |
144 | 144 | |
145 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
145 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
146 | 146 | |
147 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link(); |
|
148 | - $crawler = $client->click( $link ); |
|
147 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link(); |
|
148 | + $crawler = $client->click($link); |
|
149 | 149 | |
150 | - $form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form(); |
|
151 | - $crawler = $client->submit( $form ); |
|
150 | + $form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form(); |
|
151 | + $crawler = $client->submit($form); |
|
152 | 152 | |
153 | 153 | |
154 | - $form = $crawler->filter( '.basket-standard-coupon .coupon-new button' )->form(); |
|
154 | + $form = $crawler->filter('.basket-standard-coupon .coupon-new button')->form(); |
|
155 | 155 | $form['b_coupon'] = '90AB'; |
156 | - $crawler = $client->submit( $form ); |
|
156 | + $crawler = $client->submit($form); |
|
157 | 157 | |
158 | - $this->assertEquals( 1, $crawler->filter( '.basket-standard .product:contains("Geldwerter Nachlass")' )->count() ); |
|
158 | + $this->assertEquals(1, $crawler->filter('.basket-standard .product:contains("Geldwerter Nachlass")')->count()); |
|
159 | 159 | |
160 | 160 | |
161 | - $link = $crawler->filter( '.basket-standard-coupon .change' )->link(); |
|
162 | - $crawler = $client->click( $link ); |
|
161 | + $link = $crawler->filter('.basket-standard-coupon .change')->link(); |
|
162 | + $crawler = $client->click($link); |
|
163 | 163 | |
164 | - $this->assertEquals( 1, $crawler->filter( '.basket-standard .product' )->count() ); |
|
164 | + $this->assertEquals(1, $crawler->filter('.basket-standard .product')->count()); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | |
@@ -169,15 +169,15 @@ discard block |
||
169 | 169 | { |
170 | 170 | $client = static::createClient(); |
171 | 171 | |
172 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
172 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
173 | 173 | |
174 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link(); |
|
175 | - $crawler = $client->click( $link ); |
|
174 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link(); |
|
175 | + $crawler = $client->click($link); |
|
176 | 176 | |
177 | - $form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form(); |
|
178 | - $crawler = $client->submit( $form ); |
|
177 | + $form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form(); |
|
178 | + $crawler = $client->submit($form); |
|
179 | 179 | |
180 | - $this->assertEquals( 1, $crawler->filter( '.basket-related-bought .bought-item' )->count() ); |
|
180 | + $this->assertEquals(1, $crawler->filter('.basket-related-bought .bought-item')->count()); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | |
@@ -185,17 +185,17 @@ discard block |
||
185 | 185 | { |
186 | 186 | $client = static::createClient(); |
187 | 187 | |
188 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
188 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
189 | 189 | |
190 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link(); |
|
191 | - $crawler = $client->click( $link ); |
|
190 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link(); |
|
191 | + $crawler = $client->click($link); |
|
192 | 192 | |
193 | - $form = $crawler->filter( '.catalog-detail .addbasket .btn-action' )->form(); |
|
194 | - $crawler = $client->submit( $form ); |
|
193 | + $form = $crawler->filter('.catalog-detail .addbasket .btn-action')->form(); |
|
194 | + $crawler = $client->submit($form); |
|
195 | 195 | |
196 | - $link = $crawler->filter( '.basket-standard .btn-back' )->link(); |
|
197 | - $crawler = $client->click( $link ); |
|
196 | + $link = $crawler->filter('.basket-standard .btn-back')->link(); |
|
197 | + $crawler = $client->click($link); |
|
198 | 198 | |
199 | - $this->assertEquals( 1, $crawler->filter( '.catalog-detail .product:contains("Unittest: Bundle")' )->count() ); |
|
199 | + $this->assertEquals(1, $crawler->filter('.catalog-detail .product:contains("Unittest: Bundle")')->count()); |
|
200 | 200 | } |
201 | 201 | } |
@@ -10,17 +10,17 @@ |
||
10 | 10 | public function testTerms() |
11 | 11 | { |
12 | 12 | $client = static::createClient(); |
13 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/terms' ); |
|
13 | + $crawler = $client->request('GET', '/unittest/de/EUR/terms'); |
|
14 | 14 | |
15 | - $this->assertEquals( 1, $crawler->filter( 'body:contains("Terms")' )->count() ); |
|
15 | + $this->assertEquals(1, $crawler->filter('body:contains("Terms")')->count()); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | |
19 | 19 | public function testPrivacy() |
20 | 20 | { |
21 | 21 | $client = static::createClient(); |
22 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/privacy' ); |
|
22 | + $crawler = $client->request('GET', '/unittest/de/EUR/privacy'); |
|
23 | 23 | |
24 | - $this->assertEquals( 1, $crawler->filter( 'body:contains("Privacy")' )->count() ); |
|
24 | + $this->assertEquals(1, $crawler->filter('body:contains("Privacy")')->count()); |
|
25 | 25 | } |
26 | 26 | } |
@@ -10,210 +10,210 @@ |
||
10 | 10 | public function testCount() |
11 | 11 | { |
12 | 12 | $client = static::createClient(); |
13 | - $client->request( 'GET', '/unittest/de/EUR/count' ); |
|
13 | + $client->request('GET', '/unittest/de/EUR/count'); |
|
14 | 14 | $content = $client->getResponse()->getContent(); |
15 | 15 | |
16 | - $this->assertContains( '".catalog-filter-count li.cat-item"', $content ); |
|
17 | - $this->assertContains( '".catalog-filter-attribute .attribute-lists li.attr-item"', $content ); |
|
16 | + $this->assertContains('".catalog-filter-count li.cat-item"', $content); |
|
17 | + $this->assertContains('".catalog-filter-attribute .attribute-lists li.attr-item"', $content); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | |
21 | 21 | public function testFilterSearch() |
22 | 22 | { |
23 | 23 | $client = static::createClient(); |
24 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
24 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
25 | 25 | |
26 | - $this->assertEquals( 1, $crawler->filter( '.catalog-filter-search' )->count() ); |
|
26 | + $this->assertEquals(1, $crawler->filter('.catalog-filter-search')->count()); |
|
27 | 27 | |
28 | - $form = $crawler->filter( '.catalog-filter-search button' )->form(); |
|
28 | + $form = $crawler->filter('.catalog-filter-search button')->form(); |
|
29 | 29 | $form['f_search'] = 'Unit'; |
30 | - $crawler = $client->submit( $form ); |
|
30 | + $crawler = $client->submit($form); |
|
31 | 31 | |
32 | - $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Test Selection")' )->count() ); |
|
33 | - $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Empty Selection")' )->count() ); |
|
34 | - $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->count() ); |
|
32 | + $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Unittest: Test Selection")')->count()); |
|
33 | + $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Unittest: Empty Selection")')->count()); |
|
34 | + $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->count()); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
38 | 38 | public function testFilterTree() |
39 | 39 | { |
40 | 40 | $client = static::createClient(); |
41 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
41 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
42 | 42 | |
43 | - $this->assertEquals( 1, $crawler->filter( '.catalog-filter-tree' )->count() ); |
|
43 | + $this->assertEquals(1, $crawler->filter('.catalog-filter-tree')->count()); |
|
44 | 44 | |
45 | - $link = $crawler->filter( '.catalog-filter-tree a.cat-item' )->link(); |
|
46 | - $crawler = $client->click( $link ); |
|
45 | + $link = $crawler->filter('.catalog-filter-tree a.cat-item')->link(); |
|
46 | + $crawler = $client->click($link); |
|
47 | 47 | |
48 | - $link = $crawler->filter( '.catalog-filter-tree .categories a.cat-item' )->link(); |
|
49 | - $crawler = $client->click( $link ); |
|
48 | + $link = $crawler->filter('.catalog-filter-tree .categories a.cat-item')->link(); |
|
49 | + $crawler = $client->click($link); |
|
50 | 50 | |
51 | - $link = $crawler->filter( '.catalog-filter-tree .coffee a.cat-item' )->link(); |
|
52 | - $crawler = $client->click( $link ); |
|
51 | + $link = $crawler->filter('.catalog-filter-tree .coffee a.cat-item')->link(); |
|
52 | + $crawler = $client->click($link); |
|
53 | 53 | |
54 | - $this->assertEquals( 3, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() ); |
|
55 | - $this->assertEquals( 1, $crawler->filter( '.catalog-list-promo .product a:contains("Cafe Noire Expresso")' )->count() ); |
|
54 | + $this->assertEquals(3, $crawler->filter('.catalog-stage-breadcrumb li')->count()); |
|
55 | + $this->assertEquals(1, $crawler->filter('.catalog-list-promo .product a:contains("Cafe Noire Expresso")')->count()); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
59 | 59 | public function testFilterAttribute() |
60 | 60 | { |
61 | 61 | $client = static::createClient(); |
62 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
62 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
63 | 63 | |
64 | - $this->assertEquals( 1, $crawler->filter( '.catalog-filter-attribute' )->count() ); |
|
64 | + $this->assertEquals(1, $crawler->filter('.catalog-filter-attribute')->count()); |
|
65 | 65 | |
66 | - $nodes = $crawler->filter( '.catalog-filter-attribute .attr-size span:contains("XS")' ); |
|
67 | - $id = $nodes->parents()->filter( '.attr-item' )->attr( 'data-id'); |
|
66 | + $nodes = $crawler->filter('.catalog-filter-attribute .attr-size span:contains("XS")'); |
|
67 | + $id = $nodes->parents()->filter('.attr-item')->attr('data-id'); |
|
68 | 68 | |
69 | - $form = $crawler->filter( '.catalog-filter .btn-action' )->form(); |
|
70 | - $form['f_attrid'] = array( $id => 'xs' ); |
|
71 | - $crawler = $client->submit( $form ); |
|
69 | + $form = $crawler->filter('.catalog-filter .btn-action')->form(); |
|
70 | + $form['f_attrid'] = array($id => 'xs'); |
|
71 | + $crawler = $client->submit($form); |
|
72 | 72 | |
73 | - $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() ); |
|
74 | - $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() ); |
|
73 | + $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->count()); |
|
74 | + $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Cappuccino")')->count()); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | |
78 | 78 | public function testStageBreadcrumb() |
79 | 79 | { |
80 | 80 | $client = static::createClient(); |
81 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
81 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
82 | 82 | |
83 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link(); |
|
84 | - $crawler = $client->click( $link ); |
|
83 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link(); |
|
84 | + $crawler = $client->click($link); |
|
85 | 85 | |
86 | - $this->assertEquals( 1, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() ); |
|
86 | + $this->assertEquals(1, $crawler->filter('.catalog-stage-breadcrumb li')->count()); |
|
87 | 87 | |
88 | - $link = $crawler->filter( '.catalog-stage-breadcrumb a' )->link(); |
|
89 | - $crawler = $client->click( $link ); |
|
88 | + $link = $crawler->filter('.catalog-stage-breadcrumb a')->link(); |
|
89 | + $crawler = $client->click($link); |
|
90 | 90 | |
91 | - $this->assertEquals( 1, $crawler->filter( '.catalog-list' )->count() ); |
|
92 | - $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() ); |
|
93 | - $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() ); |
|
91 | + $this->assertEquals(1, $crawler->filter('.catalog-list')->count()); |
|
92 | + $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->count()); |
|
93 | + $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Cappuccino")')->count()); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | |
97 | 97 | public function testStageNavigator() |
98 | 98 | { |
99 | 99 | $client = static::createClient(); |
100 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
100 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
101 | 101 | |
102 | - $link = $crawler->filter( '.catalog-list-pagination .option-name' )->link(); |
|
103 | - $crawler = $client->click( $link ); |
|
102 | + $link = $crawler->filter('.catalog-list-pagination .option-name')->link(); |
|
103 | + $crawler = $client->click($link); |
|
104 | 104 | |
105 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link(); |
|
106 | - $crawler = $client->click( $link ); |
|
105 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link(); |
|
106 | + $crawler = $client->click($link); |
|
107 | 107 | |
108 | - $this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() ); |
|
109 | - $this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Bundle")' )->count() ); |
|
108 | + $this->assertEquals(1, $crawler->filter('.catalog-detail')->count()); |
|
109 | + $this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Unittest: Bundle")')->count()); |
|
110 | 110 | |
111 | - $link = $crawler->filter( '.catalog-stage-navigator a.next' )->link(); |
|
112 | - $crawler = $client->click( $link ); |
|
111 | + $link = $crawler->filter('.catalog-stage-navigator a.next')->link(); |
|
112 | + $crawler = $client->click($link); |
|
113 | 113 | |
114 | - $this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() ); |
|
115 | - $this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Empty Selection")' )->count() ); |
|
114 | + $this->assertEquals(1, $crawler->filter('.catalog-detail')->count()); |
|
115 | + $this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Unittest: Empty Selection")')->count()); |
|
116 | 116 | |
117 | - $link = $crawler->filter( '.catalog-stage-navigator a.prev' )->link(); |
|
118 | - $crawler = $client->click( $link ); |
|
117 | + $link = $crawler->filter('.catalog-stage-navigator a.prev')->link(); |
|
118 | + $crawler = $client->click($link); |
|
119 | 119 | |
120 | - $this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() ); |
|
121 | - $this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Bundle")' )->count() ); |
|
120 | + $this->assertEquals(1, $crawler->filter('.catalog-detail')->count()); |
|
121 | + $this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Unittest: Bundle")')->count()); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | |
125 | 125 | public function testListSortationName() |
126 | 126 | { |
127 | 127 | $client = static::createClient(); |
128 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
128 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
129 | 129 | |
130 | - $link = $crawler->filter( '.catalog-list-pagination .option-name' )->link(); |
|
131 | - $crawler = $client->click( $link ); |
|
130 | + $link = $crawler->filter('.catalog-list-pagination .option-name')->link(); |
|
131 | + $crawler = $client->click($link); |
|
132 | 132 | |
133 | - $products = $crawler->filter( '.catalog-list-items .product' ); |
|
134 | - $this->assertEquals( 1, $products->eq( 1 )->filter( 'h2:contains("Unittest: Bundle")' )->count() ); |
|
135 | - $this->assertEquals( 1, $products->eq( 2 )->filter( 'h2:contains("Unittest: Empty Selection")' )->count() ); |
|
133 | + $products = $crawler->filter('.catalog-list-items .product'); |
|
134 | + $this->assertEquals(1, $products->eq(1)->filter('h2:contains("Unittest: Bundle")')->count()); |
|
135 | + $this->assertEquals(1, $products->eq(2)->filter('h2:contains("Unittest: Empty Selection")')->count()); |
|
136 | 136 | |
137 | - $link = $crawler->filter( '.catalog-list-pagination .option-name' )->link(); |
|
138 | - $crawler = $client->click( $link ); |
|
137 | + $link = $crawler->filter('.catalog-list-pagination .option-name')->link(); |
|
138 | + $crawler = $client->click($link); |
|
139 | 139 | |
140 | - $products = $crawler->filter( '.catalog-list-items .product' ); |
|
140 | + $products = $crawler->filter('.catalog-list-items .product'); |
|
141 | 141 | $count = $products->count(); |
142 | 142 | |
143 | - $this->assertGreaterThan( 2, $count ); |
|
144 | - $this->assertEquals( 1, $products->eq( $count - 3 )->filter( 'h2:contains("Unittest: Empty Selection")' )->count() ); |
|
145 | - $this->assertEquals( 1, $products->eq( $count - 2 )->filter( 'h2:contains("Unittest: Bundle")' )->count() ); |
|
143 | + $this->assertGreaterThan(2, $count); |
|
144 | + $this->assertEquals(1, $products->eq($count - 3)->filter('h2:contains("Unittest: Empty Selection")')->count()); |
|
145 | + $this->assertEquals(1, $products->eq($count - 2)->filter('h2:contains("Unittest: Bundle")')->count()); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | |
149 | 149 | public function testListSortationPrice() |
150 | 150 | { |
151 | 151 | $client = static::createClient(); |
152 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
152 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
153 | 153 | |
154 | - $link = $crawler->filter( '.catalog-list-pagination .option-price' )->link(); |
|
155 | - $crawler = $client->click( $link ); |
|
154 | + $link = $crawler->filter('.catalog-list-pagination .option-price')->link(); |
|
155 | + $crawler = $client->click($link); |
|
156 | 156 | |
157 | - $products = $crawler->filter( '.catalog-list-items .product' ); |
|
157 | + $products = $crawler->filter('.catalog-list-items .product'); |
|
158 | 158 | $count = $products->count(); |
159 | 159 | |
160 | - $this->assertGreaterThan( 2, $count ); |
|
161 | - $this->assertEquals( 1, $products->eq( $count - 2 )->filter( '.value:contains("600.00 €")' )->count() ); |
|
162 | - $this->assertEquals( 1, $products->eq( $count - 1 )->filter( '.value:contains("600.00 €")' )->count() ); |
|
160 | + $this->assertGreaterThan(2, $count); |
|
161 | + $this->assertEquals(1, $products->eq($count - 2)->filter('.value:contains("600.00 €")')->count()); |
|
162 | + $this->assertEquals(1, $products->eq($count - 1)->filter('.value:contains("600.00 €")')->count()); |
|
163 | 163 | |
164 | - $link = $crawler->filter( '.catalog-list-pagination .option-price' )->link(); |
|
165 | - $crawler = $client->click( $link ); |
|
164 | + $link = $crawler->filter('.catalog-list-pagination .option-price')->link(); |
|
165 | + $crawler = $client->click($link); |
|
166 | 166 | |
167 | - $products = $crawler->filter( '.catalog-list-items .product' ); |
|
168 | - $this->assertEquals( 1, $products->eq( 0 )->filter( '.value:contains("600.00 €")' )->count() ); |
|
169 | - $this->assertEquals( 1, $products->eq( 1 )->filter( '.value:contains("600.00 €")' )->count() ); |
|
167 | + $products = $crawler->filter('.catalog-list-items .product'); |
|
168 | + $this->assertEquals(1, $products->eq(0)->filter('.value:contains("600.00 €")')->count()); |
|
169 | + $this->assertEquals(1, $products->eq(1)->filter('.value:contains("600.00 €")')->count()); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | |
173 | 173 | public function testDetailPinned() |
174 | 174 | { |
175 | 175 | $client = static::createClient(); |
176 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
176 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
177 | 177 | |
178 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link(); |
|
179 | - $crawler = $client->click( $link ); |
|
178 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link(); |
|
179 | + $crawler = $client->click($link); |
|
180 | 180 | |
181 | - $link = $crawler->filter( '.catalog-detail a.actions-button-pin' )->link(); |
|
182 | - $crawler = $client->click( $link ); |
|
181 | + $link = $crawler->filter('.catalog-detail a.actions-button-pin')->link(); |
|
182 | + $crawler = $client->click($link); |
|
183 | 183 | |
184 | - $this->assertEquals( 1, $crawler->filter( '.catalog-session-pinned .pinned-item' )->count() ); |
|
184 | + $this->assertEquals(1, $crawler->filter('.catalog-session-pinned .pinned-item')->count()); |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | |
188 | 188 | public function testDetailLastSeen() |
189 | 189 | { |
190 | 190 | $client = static::createClient(); |
191 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
191 | + $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
192 | 192 | |
193 | - $link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link(); |
|
194 | - $crawler = $client->click( $link ); |
|
193 | + $link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link(); |
|
194 | + $crawler = $client->click($link); |
|
195 | 195 | |
196 | - $this->assertEquals( 1, $crawler->filter( '.catalog-session-seen .seen-item' )->count() ); |
|
196 | + $this->assertEquals(1, $crawler->filter('.catalog-session-seen .seen-item')->count()); |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | |
200 | 200 | public function testSuggest() |
201 | 201 | { |
202 | 202 | $client = static::createClient(); |
203 | - $client->request( 'GET', '/unittest/de/EUR/suggest', array( 'f_search' => 'unit' ) ); |
|
203 | + $client->request('GET', '/unittest/de/EUR/suggest', array('f_search' => 'unit')); |
|
204 | 204 | $content = $client->getResponse()->getContent(); |
205 | 205 | |
206 | - $this->assertStringStartsWith( '[{', $content ); |
|
206 | + $this->assertStringStartsWith('[{', $content); |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | |
210 | 210 | public function testStock() |
211 | 211 | { |
212 | 212 | $client = static::createClient(); |
213 | - $client->request( 'GET', '/unittest/de/EUR/stock' ); |
|
213 | + $client->request('GET', '/unittest/de/EUR/stock'); |
|
214 | 214 | $content = $client->getResponse()->getContent(); |
215 | 215 | |
216 | - $this->assertContains( '.aimeos .product .stock', $content ); |
|
217 | - $this->assertContains( '.aimeos .catalog-detail-basket', $content ); |
|
216 | + $this->assertContains('.aimeos .product .stock', $content); |
|
217 | + $this->assertContains('.aimeos .catalog-detail-basket', $content); |
|
218 | 218 | } |
219 | 219 | } |
@@ -14,13 +14,13 @@ |
||
14 | 14 | $kernel = $this->createKernel(); |
15 | 15 | $kernel->boot(); |
16 | 16 | |
17 | - $application = new Application( $kernel ); |
|
18 | - $application->add( new Command\SetupCommand() ); |
|
17 | + $application = new Application($kernel); |
|
18 | + $application->add(new Command\SetupCommand()); |
|
19 | 19 | |
20 | - $command = $application->find( 'aimeos:setup' ); |
|
21 | - $commandTester = new CommandTester( $command ); |
|
22 | - $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest', 'tplsite' => 'unittest', '--option' => 'setup/default/demo:0' ) ); |
|
20 | + $command = $application->find('aimeos:setup'); |
|
21 | + $commandTester = new CommandTester($command); |
|
22 | + $commandTester->execute(array('command' => $command->getName(), 'site' => 'unittest', 'tplsite' => 'unittest', '--option' => 'setup/default/demo:0')); |
|
23 | 23 | |
24 | - $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
24 | + $this->assertEquals(0, $commandTester->getStatusCode()); |
|
25 | 25 | } |
26 | 26 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * |
29 | 29 | * @param Container $container Container object to access parameters |
30 | 30 | */ |
31 | - public function __construct( Container $container ) |
|
31 | + public function __construct(Container $container) |
|
32 | 32 | { |
33 | 33 | $this->container = $container; |
34 | 34 | } |
@@ -40,23 +40,23 @@ discard block |
||
40 | 40 | * @param string $pageName Name of the configured page |
41 | 41 | * @return array Associative list with body and header output separated by client name |
42 | 42 | */ |
43 | - public function getSections( $pageName ) |
|
43 | + public function getSections($pageName) |
|
44 | 44 | { |
45 | 45 | $context = $this->container->get('aimeos_context')->get(); |
46 | - $pagesConfig = $this->container->getParameter( 'aimeos_shop.page' ); |
|
47 | - $result = array( 'aibody' => array(), 'aiheader' => array() ); |
|
46 | + $pagesConfig = $this->container->getParameter('aimeos_shop.page'); |
|
47 | + $result = array('aibody' => array(), 'aiheader' => array()); |
|
48 | 48 | |
49 | 49 | $langid = $context->getLocale()->getLanguageId(); |
50 | - $tmplPaths = $this->container->get('aimeos')->get()->getCustomPaths( 'client/html/templates' ); |
|
51 | - $view = $this->container->get('aimeos_view')->create( $context->getConfig(), $tmplPaths, $langid ); |
|
52 | - $context->setView( $view ); |
|
50 | + $tmplPaths = $this->container->get('aimeos')->get()->getCustomPaths('client/html/templates'); |
|
51 | + $view = $this->container->get('aimeos_view')->create($context->getConfig(), $tmplPaths, $langid); |
|
52 | + $context->setView($view); |
|
53 | 53 | |
54 | - if( isset( $pagesConfig[$pageName] ) ) |
|
54 | + if (isset($pagesConfig[$pageName])) |
|
55 | 55 | { |
56 | - foreach( (array) $pagesConfig[$pageName] as $clientName ) |
|
56 | + foreach ((array) $pagesConfig[$pageName] as $clientName) |
|
57 | 57 | { |
58 | - $client = \Aimeos\Client\Html\Factory::createClient( $context, $tmplPaths, $clientName ); |
|
59 | - $client->setView( clone $view ); |
|
58 | + $client = \Aimeos\Client\Html\Factory::createClient($context, $tmplPaths, $clientName); |
|
59 | + $client->setView(clone $view); |
|
60 | 60 | $client->process(); |
61 | 61 | |
62 | 62 | $result['aibody'][$clientName] = $client->getBody(); |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function confirmAction() |
30 | 30 | { |
31 | - $params = $this->get( 'aimeos_page' )->getSections( 'checkout-confirm' ); |
|
32 | - return $this->render( 'AimeosShopBundle:Checkout:confirm.html.twig', $params ); |
|
31 | + $params = $this->get('aimeos_page')->getSections('checkout-confirm'); |
|
32 | + return $this->render('AimeosShopBundle:Checkout:confirm.html.twig', $params); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function indexAction() |
42 | 42 | { |
43 | - $params = $this->get( 'aimeos_page' )->getSections( 'checkout-index' ); |
|
44 | - return $this->render( 'AimeosShopBundle:Checkout:index.html.twig', $params ); |
|
43 | + $params = $this->get('aimeos_page')->getSections('checkout-index'); |
|
44 | + return $this->render('AimeosShopBundle:Checkout:index.html.twig', $params); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function updateAction() |
54 | 54 | { |
55 | - $params = $this->get( 'aimeos_page' )->getSections( 'checkout-update' ); |
|
56 | - return $this->render( 'AimeosShopBundle:Checkout:update.html.twig', $params ); |
|
55 | + $params = $this->get('aimeos_page')->getSections('checkout-update'); |
|
56 | + return $this->render('AimeosShopBundle:Checkout:update.html.twig', $params); |
|
57 | 57 | } |
58 | 58 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function indexAction() |
30 | 30 | { |
31 | - $params = $this->get( 'aimeos_page' )->getSections( 'basket-index' ); |
|
32 | - return $this->render( 'AimeosShopBundle:Basket:index.html.twig', $params ); |
|
31 | + $params = $this->get('aimeos_page')->getSections('basket-index'); |
|
32 | + return $this->render('AimeosShopBundle:Basket:index.html.twig', $params); |
|
33 | 33 | } |
34 | 34 | } |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function countAction() |
30 | 30 | { |
31 | - $params = $this->get( 'aimeos_page' )->getSections( 'catalog-count' ); |
|
32 | - return $this->render( 'AimeosShopBundle:Catalog:count.html.twig', $params ); |
|
31 | + $params = $this->get('aimeos_page')->getSections('catalog-count'); |
|
32 | + return $this->render('AimeosShopBundle:Catalog:count.html.twig', $params); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function detailAction() |
42 | 42 | { |
43 | - $params = $this->get( 'aimeos_page' )->getSections( 'catalog-detail' ); |
|
44 | - return $this->render( 'AimeosShopBundle:Catalog:detail.html.twig', $params ); |
|
43 | + $params = $this->get('aimeos_page')->getSections('catalog-detail'); |
|
44 | + return $this->render('AimeosShopBundle:Catalog:detail.html.twig', $params); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function listAction() |
54 | 54 | { |
55 | - $params = $this->get( 'aimeos_page' )->getSections( 'catalog-list' ); |
|
56 | - return $this->render( 'AimeosShopBundle:Catalog:list.html.twig', $params ); |
|
55 | + $params = $this->get('aimeos_page')->getSections('catalog-list'); |
|
56 | + return $this->render('AimeosShopBundle:Catalog:list.html.twig', $params); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | */ |
65 | 65 | public function stockAction() |
66 | 66 | { |
67 | - $params = $this->get( 'aimeos_page' )->getSections( 'catalog-stock' ); |
|
68 | - return $this->render( 'AimeosShopBundle:Catalog:stock.html.twig', $params ); |
|
67 | + $params = $this->get('aimeos_page')->getSections('catalog-stock'); |
|
68 | + return $this->render('AimeosShopBundle:Catalog:stock.html.twig', $params); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function suggestAction() |
78 | 78 | { |
79 | - $params = $this->get( 'aimeos_page' )->getSections( 'catalog-suggest' ); |
|
80 | - return $this->render( 'AimeosShopBundle:Catalog:suggest.html.twig', $params ); |
|
79 | + $params = $this->get('aimeos_page')->getSections('catalog-suggest'); |
|
80 | + return $this->render('AimeosShopBundle:Catalog:suggest.html.twig', $params); |
|
81 | 81 | } |
82 | 82 | } |