|
@@ -11,312 +11,312 @@ |
|
|
block discarded – undo |
|
11
|
11
|
public function testCount() |
|
12
|
12
|
{ |
|
13
|
13
|
$client = static::createClient(); |
|
14
|
|
- $client->request( 'GET', '/unittest/de/EUR/count' ); |
|
|
14
|
+ $client->request('GET', '/unittest/de/EUR/count'); |
|
15
|
15
|
$content = $client->getResponse()->getContent(); |
|
16
|
16
|
|
|
17
|
|
- $this->assertContains( '".catalog-filter-count li.cat-item"', $content ); |
|
18
|
|
- $this->assertContains( '".catalog-filter-attribute .attribute-lists li.attr-item"', $content ); |
|
|
17
|
+ $this->assertContains('".catalog-filter-count li.cat-item"', $content); |
|
|
18
|
+ $this->assertContains('".catalog-filter-attribute .attribute-lists li.attr-item"', $content); |
|
19
|
19
|
} |
|
20
|
20
|
|
|
21
|
21
|
|
|
22
|
22
|
public function testFilterSearch() |
|
23
|
23
|
{ |
|
24
|
24
|
$client = static::createClient(); |
|
25
|
|
- $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
|
25
|
+ $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
26
|
26
|
|
|
27
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-filter-search' )->count() ); |
|
|
27
|
+ $this->assertEquals(1, $crawler->filter('.catalog-filter-search')->count()); |
|
28
|
28
|
|
|
29
|
|
- $form = $crawler->filter( '.catalog-filter-search button' )->form(); |
|
|
29
|
+ $form = $crawler->filter('.catalog-filter-search button')->form(); |
|
30
|
30
|
$form['f_search'] = 'Unit'; |
|
31
|
|
- $crawler = $client->submit( $form ); |
|
|
31
|
+ $crawler = $client->submit($form); |
|
32
|
32
|
|
|
33
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Test Selection")' )->count() ); |
|
34
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Empty Selection")' )->count() ); |
|
35
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->count() ); |
|
|
33
|
+ $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Unittest: Test Selection")')->count()); |
|
|
34
|
+ $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Unittest: Empty Selection")')->count()); |
|
|
35
|
+ $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->count()); |
|
36
|
36
|
} |
|
37
|
37
|
|
|
38
|
38
|
|
|
39
|
39
|
public function testFilterTree() |
|
40
|
40
|
{ |
|
41
|
41
|
$client = static::createClient(); |
|
42
|
|
- $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
|
42
|
+ $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
43
|
43
|
|
|
44
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-filter-tree' )->count() ); |
|
|
44
|
+ $this->assertEquals(1, $crawler->filter('.catalog-filter-tree')->count()); |
|
45
|
45
|
|
|
46
|
|
- $link = $crawler->filter( '.catalog-filter-tree a.cat-item' )->link(); |
|
47
|
|
- $crawler = $client->click( $link ); |
|
|
46
|
+ $link = $crawler->filter('.catalog-filter-tree a.cat-item')->link(); |
|
|
47
|
+ $crawler = $client->click($link); |
|
48
|
48
|
|
|
49
|
|
- $link = $crawler->filter( '.catalog-filter-tree .categories a.cat-item' )->link(); |
|
50
|
|
- $crawler = $client->click( $link ); |
|
|
49
|
+ $link = $crawler->filter('.catalog-filter-tree .categories a.cat-item')->link(); |
|
|
50
|
+ $crawler = $client->click($link); |
|
51
|
51
|
|
|
52
|
|
- $link = $crawler->filter( '.catalog-filter-tree .coffee a.cat-item' )->link(); |
|
53
|
|
- $crawler = $client->click( $link ); |
|
|
52
|
+ $link = $crawler->filter('.catalog-filter-tree .coffee a.cat-item')->link(); |
|
|
53
|
+ $crawler = $client->click($link); |
|
54
|
54
|
|
|
55
|
|
- $this->assertEquals( 3, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() ); |
|
56
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-list-promo .product a:contains("Cafe Noire Expresso")' )->count() ); |
|
|
55
|
+ $this->assertEquals(3, $crawler->filter('.catalog-stage-breadcrumb li')->count()); |
|
|
56
|
+ $this->assertEquals(1, $crawler->filter('.catalog-list-promo .product a:contains("Cafe Noire Expresso")')->count()); |
|
57
|
57
|
} |
|
58
|
58
|
|
|
59
|
59
|
|
|
60
|
60
|
public function testFilterAttribute() |
|
61
|
61
|
{ |
|
62
|
62
|
$client = static::createClient(); |
|
63
|
|
- $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
|
63
|
+ $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
64
|
64
|
|
|
65
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-filter-attribute' )->count() ); |
|
|
65
|
+ $this->assertEquals(1, $crawler->filter('.catalog-filter-attribute')->count()); |
|
66
|
66
|
|
|
67
|
|
- $nodes = $crawler->filter( '.catalog-filter-attribute .attr-size span:contains("XS")' ); |
|
68
|
|
- $id = $nodes->parents()->filter( '.attr-item' )->attr( 'data-id'); |
|
|
67
|
+ $nodes = $crawler->filter('.catalog-filter-attribute .attr-size span:contains("XS")'); |
|
|
68
|
+ $id = $nodes->parents()->filter('.attr-item')->attr('data-id'); |
|
69
|
69
|
|
|
70
|
|
- $form = $crawler->filter( '.catalog-filter .btn-primary' )->form(); |
|
|
70
|
+ $form = $crawler->filter('.catalog-filter .btn-primary')->form(); |
|
71
|
71
|
$values = $form->getPhpValues(); |
|
72
|
|
- $values['f_attrid'] = array( $id ); |
|
73
|
|
- $crawler = $client->request( $form->getMethod(), $form->getUri(), $values, $form->getPhpFiles() ); |
|
|
72
|
+ $values['f_attrid'] = array($id); |
|
|
73
|
+ $crawler = $client->request($form->getMethod(), $form->getUri(), $values, $form->getPhpFiles()); |
|
74
|
74
|
|
|
75
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() ); |
|
76
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() ); |
|
|
75
|
+ $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->count()); |
|
|
76
|
+ $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Cappuccino")')->count()); |
|
77
|
77
|
} |
|
78
|
78
|
|
|
79
|
79
|
|
|
80
|
80
|
public function testStageBreadcrumb() |
|
81
|
81
|
{ |
|
82
|
82
|
$client = static::createClient(); |
|
83
|
|
- $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
|
83
|
+ $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
84
|
84
|
|
|
85
|
|
- $link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link(); |
|
86
|
|
- $crawler = $client->click( $link ); |
|
|
85
|
+ $link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link(); |
|
|
86
|
+ $crawler = $client->click($link); |
|
87
|
87
|
|
|
88
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() ); |
|
|
88
|
+ $this->assertEquals(1, $crawler->filter('.catalog-stage-breadcrumb li')->count()); |
|
89
|
89
|
|
|
90
|
|
- $link = $crawler->filter( '.catalog-stage-breadcrumb a' )->link(); |
|
91
|
|
- $crawler = $client->click( $link ); |
|
|
90
|
+ $link = $crawler->filter('.catalog-stage-breadcrumb a')->link(); |
|
|
91
|
+ $crawler = $client->click($link); |
|
92
|
92
|
|
|
93
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-list' )->count() ); |
|
94
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() ); |
|
95
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() ); |
|
|
93
|
+ $this->assertEquals(1, $crawler->filter('.catalog-list')->count()); |
|
|
94
|
+ $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->count()); |
|
|
95
|
+ $this->assertEquals(1, $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Cappuccino")')->count()); |
|
96
|
96
|
} |
|
97
|
97
|
|
|
98
|
98
|
|
|
99
|
99
|
public function testStageNavigator() |
|
100
|
100
|
{ |
|
101
|
101
|
$client = static::createClient(); |
|
102
|
|
- $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
|
102
|
+ $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
103
|
103
|
|
|
104
|
|
- $link = $crawler->filter( '.catalog-list .pagination .option-name' )->link(); |
|
105
|
|
- $crawler = $client->click( $link ); |
|
|
104
|
+ $link = $crawler->filter('.catalog-list .pagination .option-name')->link(); |
|
|
105
|
+ $crawler = $client->click($link); |
|
106
|
106
|
|
|
107
|
|
- $link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link(); |
|
108
|
|
- $crawler = $client->click( $link ); |
|
|
107
|
+ $link = $crawler->filter('.catalog-list-items .product a:contains("Unittest: Bundle")')->link(); |
|
|
108
|
+ $crawler = $client->click($link); |
|
109
|
109
|
|
|
110
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() ); |
|
111
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Bundle")' )->count() ); |
|
|
110
|
+ $this->assertEquals(1, $crawler->filter('.catalog-detail')->count()); |
|
|
111
|
+ $this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Unittest: Bundle")')->count()); |
|
112
|
112
|
|
|
113
|
|
- $link = $crawler->filter( '.catalog-stage-navigator a.next' )->link(); |
|
114
|
|
- $crawler = $client->click( $link ); |
|
|
113
|
+ $link = $crawler->filter('.catalog-stage-navigator a.next')->link(); |
|
|
114
|
+ $crawler = $client->click($link); |
|
115
|
115
|
|
|
116
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() ); |
|
117
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Empty Selection")' )->count() ); |
|
|
116
|
+ $this->assertEquals(1, $crawler->filter('.catalog-detail')->count()); |
|
|
117
|
+ $this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Unittest: Empty Selection")')->count()); |
|
118
|
118
|
|
|
119
|
|
- $link = $crawler->filter( '.catalog-stage-navigator a.prev' )->link(); |
|
120
|
|
- $crawler = $client->click( $link ); |
|
|
119
|
+ $link = $crawler->filter('.catalog-stage-navigator a.prev')->link(); |
|
|
120
|
+ $crawler = $client->click($link); |
|
121
|
121
|
|
|
122
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() ); |
|
123
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Bundle")' )->count() ); |
|
|
122
|
+ $this->assertEquals(1, $crawler->filter('.catalog-detail')->count()); |
|
|
123
|
+ $this->assertEquals(1, $crawler->filter('.catalog-detail:contains("Unittest: Bundle")')->count()); |
|
124
|
124
|
} |
|
125
|
125
|
|
|
126
|
126
|
|
|
127
|
127
|
public function testListSortationName() |
|
128
|
128
|
{ |
|
129
|
129
|
$client = static::createClient(); |
|
130
|
|
- $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
|
130
|
+ $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
131
|
131
|
|
|
132
|
|
- $link = $crawler->filter( '.catalog-list .pagination .option-name' )->link(); |
|
133
|
|
- $crawler = $client->click( $link ); |
|
|
132
|
+ $link = $crawler->filter('.catalog-list .pagination .option-name')->link(); |
|
|
133
|
+ $crawler = $client->click($link); |
|
134
|
134
|
|
|
135
|
|
- $products = $crawler->filter( '.catalog-list-items .product' ); |
|
136
|
|
- $this->assertEquals( 1, $products->eq( 0 )->filter( 'h2:contains("16 discs")' )->count() ); |
|
137
|
|
- $this->assertEquals( 1, $products->eq( 1 )->filter( 'h2:contains("Cafe Noire Cappuccino")' )->count() ); |
|
138
|
|
- $this->assertEquals( 1, $products->eq( 2 )->filter( 'h2:contains("Cafe Noire Expresso")' )->count() ); |
|
139
|
|
- $this->assertEquals( 1, $products->eq( 3 )->filter( 'h2:contains("Unittest: Bundle")' )->count() ); |
|
140
|
|
- $this->assertEquals( 1, $products->eq( 4 )->filter( 'h2:contains("Unittest: Empty Selection")' )->count() ); |
|
|
135
|
+ $products = $crawler->filter('.catalog-list-items .product'); |
|
|
136
|
+ $this->assertEquals(1, $products->eq(0)->filter('h2:contains("16 discs")')->count()); |
|
|
137
|
+ $this->assertEquals(1, $products->eq(1)->filter('h2:contains("Cafe Noire Cappuccino")')->count()); |
|
|
138
|
+ $this->assertEquals(1, $products->eq(2)->filter('h2:contains("Cafe Noire Expresso")')->count()); |
|
|
139
|
+ $this->assertEquals(1, $products->eq(3)->filter('h2:contains("Unittest: Bundle")')->count()); |
|
|
140
|
+ $this->assertEquals(1, $products->eq(4)->filter('h2:contains("Unittest: Empty Selection")')->count()); |
|
141
|
141
|
|
|
142
|
|
- $link = $crawler->filter( '.catalog-list .pagination .option-name' )->link(); |
|
143
|
|
- $crawler = $client->click( $link ); |
|
|
142
|
+ $link = $crawler->filter('.catalog-list .pagination .option-name')->link(); |
|
|
143
|
+ $crawler = $client->click($link); |
|
144
|
144
|
|
|
145
|
|
- $products = $crawler->filter( '.catalog-list-items .product' ); |
|
|
145
|
+ $products = $crawler->filter('.catalog-list-items .product'); |
|
146
|
146
|
$count = $products->count(); |
|
147
|
147
|
|
|
148
|
|
- $this->assertGreaterThan( 2, $count ); |
|
149
|
|
- $this->assertEquals( 1, $products->eq( $count - 1 )->filter( 'h2:contains("16 discs")' )->count() ); |
|
150
|
|
- $this->assertEquals( 1, $products->eq( $count - 2 )->filter( 'h2:contains("Cafe Noire Cappuccino")' )->count() ); |
|
|
148
|
+ $this->assertGreaterThan(2, $count); |
|
|
149
|
+ $this->assertEquals(1, $products->eq($count - 1)->filter('h2:contains("16 discs")')->count()); |
|
|
150
|
+ $this->assertEquals(1, $products->eq($count - 2)->filter('h2:contains("Cafe Noire Cappuccino")')->count()); |
|
151
|
151
|
} |
|
152
|
152
|
|
|
153
|
153
|
|
|
154
|
154
|
public function testListSortationPrice() |
|
155
|
155
|
{ |
|
156
|
156
|
$client = static::createClient(); |
|
157
|
|
- $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
|
157
|
+ $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
158
|
158
|
|
|
159
|
|
- $link = $crawler->filter( '.catalog-list .pagination .option-price' )->link(); |
|
160
|
|
- $crawler = $client->click( $link ); |
|
|
159
|
+ $link = $crawler->filter('.catalog-list .pagination .option-price')->link(); |
|
|
160
|
+ $crawler = $client->click($link); |
|
161
|
161
|
|
|
162
|
|
- $products = $crawler->filter( '.catalog-list-items .product' ); |
|
|
162
|
+ $products = $crawler->filter('.catalog-list-items .product'); |
|
163
|
163
|
$count = $products->count(); |
|
164
|
164
|
|
|
165
|
|
- $this->assertGreaterThan( 2, $count ); |
|
166
|
|
- $this->assertEquals( 1, $products->eq( $count - 2 )->filter( '.value:contains("600.00 €")' )->count() ); |
|
167
|
|
- $this->assertEquals( 1, $products->eq( $count - 1 )->filter( '.value:contains("600.00 €")' )->count() ); |
|
|
165
|
+ $this->assertGreaterThan(2, $count); |
|
|
166
|
+ $this->assertEquals(1, $products->eq($count - 2)->filter('.value:contains("600.00 €")')->count()); |
|
|
167
|
+ $this->assertEquals(1, $products->eq($count - 1)->filter('.value:contains("600.00 €")')->count()); |
|
168
|
168
|
|
|
169
|
|
- $link = $crawler->filter( '.catalog-list .pagination .option-price' )->link(); |
|
170
|
|
- $crawler = $client->click( $link ); |
|
|
169
|
+ $link = $crawler->filter('.catalog-list .pagination .option-price')->link(); |
|
|
170
|
+ $crawler = $client->click($link); |
|
171
|
171
|
|
|
172
|
|
- $products = $crawler->filter( '.catalog-list-items .product' ); |
|
173
|
|
- $this->assertEquals( 1, $products->eq( 0 )->filter( '.value:contains("600.00 €")' )->count() ); |
|
174
|
|
- $this->assertEquals( 1, $products->eq( 1 )->filter( '.value:contains("600.00 €")' )->count() ); |
|
|
172
|
+ $products = $crawler->filter('.catalog-list-items .product'); |
|
|
173
|
+ $this->assertEquals(1, $products->eq(0)->filter('.value:contains("600.00 €")')->count()); |
|
|
174
|
+ $this->assertEquals(1, $products->eq(1)->filter('.value:contains("600.00 €")')->count()); |
|
175
|
175
|
} |
|
176
|
176
|
|
|
177
|
177
|
|
|
178
|
178
|
public function testDetailPinned() |
|
179
|
179
|
{ |
|
180
|
180
|
$client = static::createClient(); |
|
181
|
|
- $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
|
181
|
+ $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
182
|
182
|
|
|
183
|
|
- $link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link(); |
|
184
|
|
- $crawler = $client->click( $link ); |
|
|
183
|
+ $link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link(); |
|
|
184
|
+ $crawler = $client->click($link); |
|
185
|
185
|
|
|
186
|
|
- $link = $crawler->filter( '.catalog-detail a.actions-button-pin' )->link(); |
|
187
|
|
- $crawler = $client->click( $link ); |
|
|
186
|
+ $link = $crawler->filter('.catalog-detail a.actions-button-pin')->link(); |
|
|
187
|
+ $crawler = $client->click($link); |
|
188
|
188
|
|
|
189
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-session-pinned .pinned-item' )->count() ); |
|
|
189
|
+ $this->assertEquals(1, $crawler->filter('.catalog-session-pinned .pinned-item')->count()); |
|
190
|
190
|
} |
|
191
|
191
|
|
|
192
|
192
|
|
|
193
|
193
|
public function testDetailLastSeen() |
|
194
|
194
|
{ |
|
195
|
195
|
$client = static::createClient(); |
|
196
|
|
- $crawler = $client->request( 'GET', '/unittest/de/EUR/list' ); |
|
|
196
|
+ $crawler = $client->request('GET', '/unittest/de/EUR/list'); |
|
197
|
197
|
|
|
198
|
|
- $link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link(); |
|
199
|
|
- $crawler = $client->click( $link ); |
|
|
198
|
+ $link = $crawler->filter('.catalog-list-items .product a:contains("Cafe Noire Expresso")')->link(); |
|
|
199
|
+ $crawler = $client->click($link); |
|
200
|
200
|
|
|
201
|
|
- $this->assertEquals( 1, $crawler->filter( '.catalog-session-seen .seen-item' )->count() ); |
|
|
201
|
+ $this->assertEquals(1, $crawler->filter('.catalog-session-seen .seen-item')->count()); |
|
202
|
202
|
} |
|
203
|
203
|
|
|
204
|
204
|
|
|
205
|
205
|
public function testSuggest() |
|
206
|
206
|
{ |
|
207
|
207
|
$client = static::createClient(); |
|
208
|
|
- $client->request( 'GET', '/unittest/de/EUR/suggest', array( 'f_search' => 'unit' ) ); |
|
|
208
|
+ $client->request('GET', '/unittest/de/EUR/suggest', array('f_search' => 'unit')); |
|
209
|
209
|
$content = $client->getResponse()->getContent(); |
|
210
|
210
|
|
|
211
|
|
- $this->assertStringStartsWith( '[{', $content ); |
|
|
211
|
+ $this->assertStringStartsWith('[{', $content); |
|
212
|
212
|
} |
|
213
|
213
|
|
|
214
|
214
|
|
|
215
|
215
|
public function testStock() |
|
216
|
216
|
{ |
|
217
|
217
|
$client = static::createClient(); |
|
218
|
|
- $client->request( 'GET', '/unittest/de/EUR/stock' ); |
|
|
218
|
+ $client->request('GET', '/unittest/de/EUR/stock'); |
|
219
|
219
|
$content = $client->getResponse()->getContent(); |
|
220
|
220
|
|
|
221
|
|
- $this->assertContains( '.aimeos .product .stock', $content ); |
|
222
|
|
- $this->assertContains( '.aimeos .catalog-detail-basket', $content ); |
|
|
221
|
+ $this->assertContains('.aimeos .product .stock', $content); |
|
|
222
|
+ $this->assertContains('.aimeos .catalog-detail-basket', $content); |
|
223
|
223
|
} |
|
224
|
224
|
|
|
225
|
225
|
|
|
226
|
226
|
public function testCountComponent() |
|
227
|
227
|
{ |
|
228
|
|
- $mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' ) |
|
229
|
|
- ->setMethods( array( 'getOutput' ) ) |
|
|
228
|
+ $mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController') |
|
|
229
|
+ ->setMethods(array('getOutput')) |
|
230
|
230
|
->disableOriginalConstructor() |
|
231
|
231
|
->getMock(); |
|
232
|
232
|
|
|
233
|
|
- $response = Response::create( 'test' ); |
|
234
|
|
- $mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) ); |
|
|
233
|
+ $response = Response::create('test'); |
|
|
234
|
+ $mock->expects($this->once())->method('getOutput')->will($this->returnValue($response)); |
|
235
|
235
|
|
|
236
|
|
- $this->assertSame( $response, $mock->countComponentAction() ); |
|
|
236
|
+ $this->assertSame($response, $mock->countComponentAction()); |
|
237
|
237
|
} |
|
238
|
238
|
|
|
239
|
239
|
|
|
240
|
240
|
public function testDetailComponent() |
|
241
|
241
|
{ |
|
242
|
|
- $mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' ) |
|
243
|
|
- ->setMethods( array( 'getOutput' ) ) |
|
|
242
|
+ $mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController') |
|
|
243
|
+ ->setMethods(array('getOutput')) |
|
244
|
244
|
->disableOriginalConstructor() |
|
245
|
245
|
->getMock(); |
|
246
|
246
|
|
|
247
|
|
- $response = Response::create( 'test' ); |
|
248
|
|
- $mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) ); |
|
|
247
|
+ $response = Response::create('test'); |
|
|
248
|
+ $mock->expects($this->once())->method('getOutput')->will($this->returnValue($response)); |
|
249
|
249
|
|
|
250
|
|
- $this->assertSame( $response, $mock->detailComponentAction() ); |
|
|
250
|
+ $this->assertSame($response, $mock->detailComponentAction()); |
|
251
|
251
|
} |
|
252
|
252
|
|
|
253
|
253
|
|
|
254
|
254
|
public function testFilterComponent() |
|
255
|
255
|
{ |
|
256
|
|
- $mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' ) |
|
257
|
|
- ->setMethods( array( 'getOutput' ) ) |
|
|
256
|
+ $mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController') |
|
|
257
|
+ ->setMethods(array('getOutput')) |
|
258
|
258
|
->disableOriginalConstructor() |
|
259
|
259
|
->getMock(); |
|
260
|
260
|
|
|
261
|
|
- $response = Response::create( 'test' ); |
|
262
|
|
- $mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) ); |
|
|
261
|
+ $response = Response::create('test'); |
|
|
262
|
+ $mock->expects($this->once())->method('getOutput')->will($this->returnValue($response)); |
|
263
|
263
|
|
|
264
|
|
- $this->assertSame( $response, $mock->filterComponentAction() ); |
|
|
264
|
+ $this->assertSame($response, $mock->filterComponentAction()); |
|
265
|
265
|
} |
|
266
|
266
|
|
|
267
|
267
|
|
|
268
|
268
|
public function testListComponent() |
|
269
|
269
|
{ |
|
270
|
|
- $mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' ) |
|
271
|
|
- ->setMethods( array( 'getOutput' ) ) |
|
|
270
|
+ $mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController') |
|
|
271
|
+ ->setMethods(array('getOutput')) |
|
272
|
272
|
->disableOriginalConstructor() |
|
273
|
273
|
->getMock(); |
|
274
|
274
|
|
|
275
|
|
- $response = Response::create( 'test' ); |
|
276
|
|
- $mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) ); |
|
|
275
|
+ $response = Response::create('test'); |
|
|
276
|
+ $mock->expects($this->once())->method('getOutput')->will($this->returnValue($response)); |
|
277
|
277
|
|
|
278
|
|
- $this->assertSame( $response, $mock->listComponentAction() ); |
|
|
278
|
+ $this->assertSame($response, $mock->listComponentAction()); |
|
279
|
279
|
} |
|
280
|
280
|
|
|
281
|
281
|
|
|
282
|
282
|
public function testSessionComponent() |
|
283
|
283
|
{ |
|
284
|
|
- $mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' ) |
|
285
|
|
- ->setMethods( array( 'getOutput' ) ) |
|
|
284
|
+ $mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController') |
|
|
285
|
+ ->setMethods(array('getOutput')) |
|
286
|
286
|
->disableOriginalConstructor() |
|
287
|
287
|
->getMock(); |
|
288
|
288
|
|
|
289
|
|
- $response = Response::create( 'test' ); |
|
290
|
|
- $mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) ); |
|
|
289
|
+ $response = Response::create('test'); |
|
|
290
|
+ $mock->expects($this->once())->method('getOutput')->will($this->returnValue($response)); |
|
291
|
291
|
|
|
292
|
|
- $this->assertSame( $response, $mock->sessionComponentAction() ); |
|
|
292
|
+ $this->assertSame($response, $mock->sessionComponentAction()); |
|
293
|
293
|
} |
|
294
|
294
|
|
|
295
|
295
|
|
|
296
|
296
|
public function testStageComponent() |
|
297
|
297
|
{ |
|
298
|
|
- $mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' ) |
|
299
|
|
- ->setMethods( array( 'getOutput' ) ) |
|
|
298
|
+ $mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController') |
|
|
299
|
+ ->setMethods(array('getOutput')) |
|
300
|
300
|
->disableOriginalConstructor() |
|
301
|
301
|
->getMock(); |
|
302
|
302
|
|
|
303
|
|
- $response = Response::create( 'test' ); |
|
304
|
|
- $mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) ); |
|
|
303
|
+ $response = Response::create('test'); |
|
|
304
|
+ $mock->expects($this->once())->method('getOutput')->will($this->returnValue($response)); |
|
305
|
305
|
|
|
306
|
|
- $this->assertSame( $response, $mock->stageComponentAction() ); |
|
|
306
|
+ $this->assertSame($response, $mock->stageComponentAction()); |
|
307
|
307
|
} |
|
308
|
308
|
|
|
309
|
309
|
|
|
310
|
310
|
public function testStockComponent() |
|
311
|
311
|
{ |
|
312
|
|
- $mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' ) |
|
313
|
|
- ->setMethods( array( 'getOutput' ) ) |
|
|
312
|
+ $mock = $this->getMockBuilder('Aimeos\ShopBundle\Controller\CatalogController') |
|
|
313
|
+ ->setMethods(array('getOutput')) |
|
314
|
314
|
->disableOriginalConstructor() |
|
315
|
315
|
->getMock(); |
|
316
|
316
|
|
|
317
|
|
- $response = Response::create( 'test' ); |
|
318
|
|
- $mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) ); |
|
|
317
|
+ $response = Response::create('test'); |
|
|
318
|
+ $mock->expects($this->once())->method('getOutput')->will($this->returnValue($response)); |
|
319
|
319
|
|
|
320
|
|
- $this->assertSame( $response, $mock->stockComponentAction() ); |
|
|
320
|
+ $this->assertSame($response, $mock->stockComponentAction()); |
|
321
|
321
|
} |
|
322
|
322
|
} |