|
@@ -110,6 +110,10 @@ class FavoriteControllerTest extends FunctionalTest
|
110
|
110
|
|
111
|
111
|
$this->isResponseSuccess();
|
112
|
112
|
|
|
113
|
+
|
|
114
|
+ $joelle = $this->getUser('joelle');
|
|
115
|
+ $this->assertEquals($joelle->getReputation(), 2);
|
|
116
|
+
|
113
|
117
|
|
114
|
118
|
$this->exist('li:contains("DUDELDRUM")');
|
115
|
119
|
$this->exist('a[href="'.($url = $this->generateUrl('favorite_add', array(
|
|
@@ -141,6 +145,10 @@ class FavoriteControllerTest extends FunctionalTest
|
141
|
145
|
|
142
|
146
|
$this->assertTrue(!is_null($favorite));
|
143
|
147
|
|
|
148
|
+
|
|
149
|
+ $joelle = $this->getUser('joelle');
|
|
150
|
+ $this->assertEquals($joelle->getReputation(), 7);
|
|
151
|
+
|
144
|
152
|
|
145
|
153
|
$this->crawler = $this->client->request('GET', $this->generateUrl('favorites_my_list'));
|
146
|
154
|
|
|
@@ -164,6 +172,10 @@ class FavoriteControllerTest extends FunctionalTest
|
164
|
172
|
));
|
165
|
173
|
|
166
|
174
|
$this->assertTrue(is_null($favorite));
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+ $joelle = $this->getUser('joelle');
|
|
178
|
+ $this->assertEquals($joelle->getReputation(), 2);
|
167
|
179
|
}
|
168
|
180
|
|
169
|
181
|
public function testAjax()
|
|
@@ -177,6 +189,10 @@ class FavoriteControllerTest extends FunctionalTest
|
177
|
189
|
->findOneByName('Ed Cox - La fanfare des teuffeurs (Hardcordian)')
|
178
|
190
|
;
|
179
|
191
|
|
|
192
|
+
|
|
193
|
+ $bux = $this->getUser('bux');
|
|
194
|
+ $this->assertEquals($bux->getReputation(), 22);
|
|
195
|
+
|
180
|
196
|
|
181
|
197
|
|
182
|
198
|
$url = $this->generateUrl('favorite_add', array(
|
|
@@ -199,6 +215,10 @@ class FavoriteControllerTest extends FunctionalTest
|
199
|
215
|
|
200
|
216
|
$this->assertTrue(!is_null($fav));
|
201
|
217
|
|
|
218
|
+
|
|
219
|
+ $bux = $this->getUser('bux');
|
|
220
|
+ $this->assertEquals($bux->getReputation(), 22);
|
|
221
|
+
|
202
|
222
|
|
203
|
223
|
$url = $this->generateUrl('favorite_remove', array(
|
204
|
224
|
'id' => $element->getId(),
|
|
@@ -217,6 +237,10 @@ class FavoriteControllerTest extends FunctionalTest
|
217
|
237
|
));
|
218
|
238
|
|
219
|
239
|
$this->assertTrue(is_null($fav));
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+ $bux = $this->getUser('bux');
|
|
243
|
+ $this->assertEquals($bux->getReputation(), 22);
|
220
|
244
|
}
|
221
|
245
|
|
222
|
246
|
|