|
@@ 30-49 (lines=20) @@
|
| 27 |
|
->count()); |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
public function testSurveyCreate() |
| 31 |
|
{ |
| 32 |
|
$client = static::createClient(); |
| 33 |
|
|
| 34 |
|
$crawler = $client->request('GET', '/surveys/create/internship', array(), array(), array( |
| 35 |
|
'PHP_AUTH_USER' => '[email protected]', |
| 36 |
|
'PHP_AUTH_PW' => 'admin', |
| 37 |
|
)); |
| 38 |
|
|
| 39 |
|
$this->assertEquals(200, $client->getResponse()->getStatusCode()); |
| 40 |
|
|
| 41 |
|
$form = $crawler->selectButton('Create survey')->form(); |
| 42 |
|
|
| 43 |
|
$form['survey[user]']->select('2'); |
| 44 |
|
|
| 45 |
|
$client->followRedirects(); |
| 46 |
|
$client->submit($form); |
| 47 |
|
|
| 48 |
|
$this->assertEquals(200, $client->getResponse()->getStatusCode()); |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
public function testSurveyDelete() |
| 52 |
|
{ |
|
@@ 51-69 (lines=19) @@
|
| 48 |
|
$this->assertEquals(200, $client->getResponse()->getStatusCode()); |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
public function testSurveyDelete() |
| 52 |
|
{ |
| 53 |
|
$client = static::createClient(); |
| 54 |
|
|
| 55 |
|
$crawler = $client->request('GET', '/surveys/delete/1', array(), array(), array( |
| 56 |
|
'PHP_AUTH_USER' => '[email protected]', |
| 57 |
|
'PHP_AUTH_PW' => 'admin', |
| 58 |
|
)); |
| 59 |
|
|
| 60 |
|
$this->assertEquals(200, $client->getResponse()->getStatusCode()); |
| 61 |
|
|
| 62 |
|
$form = $crawler->selectButton('Delete survey')->form(); |
| 63 |
|
|
| 64 |
|
$client->followRedirects(); |
| 65 |
|
$client->submit($form); |
| 66 |
|
|
| 67 |
|
$this->assertEquals(200, $client->getResponse()->getStatusCode()); |
| 68 |
|
exec('./bin/console d:d:d --force --env=test'); |
| 69 |
|
} |
| 70 |
|
} |
| 71 |
|
|