| @@ 16-30 (lines=15) @@ | ||
| 13 | ||
| 14 | class DefaultControllerTest extends WebTestCase |
|
| 15 | { |
|
| 16 | public function testIndex() |
|
| 17 | { |
|
| 18 | $this->markTestIncomplete(); // Test does not work any more with Symfony 3.4 |
|
| 19 | ||
| 20 | $client = static::createClient(); |
|
| 21 | ||
| 22 | $crawler = $client->request('GET', '/'); |
|
| 23 | ||
| 24 | $this->assertSame( |
|
| 25 | 200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK, |
|
| 26 | $client->getResponse()->getStatusCode() |
|
| 27 | ); |
|
| 28 | ||
| 29 | $this->assertContains('Hello World!', $client->getResponse()->getContent()); |
|
| 30 | } |
|
| 31 | ||
| 32 | public function testArgument() |
|
| 33 | { |
|
| @@ 32-46 (lines=15) @@ | ||
| 29 | $this->assertContains('Hello World!', $client->getResponse()->getContent()); |
|
| 30 | } |
|
| 31 | ||
| 32 | public function testArgument() |
|
| 33 | { |
|
| 34 | $this->markTestIncomplete(); // Test does not work any more with Symfony 3.4 |
|
| 35 | ||
| 36 | $client = static::createClient(); |
|
| 37 | ||
| 38 | $crawler = $client->request('GET', '/argument'); |
|
| 39 | ||
| 40 | $this->assertSame( |
|
| 41 | 200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK, |
|
| 42 | $client->getResponse()->getStatusCode() |
|
| 43 | ); |
|
| 44 | ||
| 45 | $this->assertContains('Hello World!', $client->getResponse()->getContent()); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function testConstructor() |
|
| 49 | { |
|
| @@ 48-62 (lines=15) @@ | ||
| 45 | $this->assertContains('Hello World!', $client->getResponse()->getContent()); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function testConstructor() |
|
| 49 | { |
|
| 50 | $this->markTestIncomplete(); // Test does not work any more with Symfony 3.4 |
|
| 51 | ||
| 52 | $client = static::createClient(); |
|
| 53 | ||
| 54 | $crawler = $client->request('GET', '/constructor'); |
|
| 55 | ||
| 56 | $this->assertSame( |
|
| 57 | 200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK, |
|
| 58 | $client->getResponse()->getStatusCode() |
|
| 59 | ); |
|
| 60 | ||
| 61 | $this->assertContains('Hello World!', $client->getResponse()->getContent()); |
|
| 62 | } |
|
| 63 | ||
| 64 | public function testVariadic() |
|
| 65 | { |
|
| @@ 64-78 (lines=15) @@ | ||
| 61 | $this->assertContains('Hello World!', $client->getResponse()->getContent()); |
|
| 62 | } |
|
| 63 | ||
| 64 | public function testVariadic() |
|
| 65 | { |
|
| 66 | $this->markTestIncomplete(); // Test does not work any more with Symfony 3.4 |
|
| 67 | ||
| 68 | $client = static::createClient(); |
|
| 69 | ||
| 70 | $crawler = $client->request('GET', '/variadic/request'); |
|
| 71 | ||
| 72 | $this->assertSame( |
|
| 73 | 200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK, |
|
| 74 | $client->getResponse()->getStatusCode() |
|
| 75 | ); |
|
| 76 | ||
| 77 | $this->assertContains('Hello World!', $client->getResponse()->getContent()); |
|
| 78 | } |
|
| 79 | } |
|
| 80 | ||
| @@ 16-30 (lines=15) @@ | ||
| 13 | ||
| 14 | class DefaultControllerTest extends WebTestCase |
|
| 15 | { |
|
| 16 | public function testIndex() |
|
| 17 | { |
|
| 18 | $this->markTestIncomplete(); // Test does not work any more with Symfony 3.4 |
|
| 19 | ||
| 20 | $client = static::createClient(); |
|
| 21 | ||
| 22 | $crawler = $client->request('GET', '/'); |
|
| 23 | ||
| 24 | $this->assertSame( |
|
| 25 | 200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK, |
|
| 26 | $client->getResponse()->getStatusCode() |
|
| 27 | ); |
|
| 28 | ||
| 29 | $this->assertContains('Hello Component!', $client->getResponse()->getContent()); |
|
| 30 | } |
|
| 31 | ||
| 32 | public function testArgument() |
|
| 33 | { |
|
| @@ 32-46 (lines=15) @@ | ||
| 29 | $this->assertContains('Hello Component!', $client->getResponse()->getContent()); |
|
| 30 | } |
|
| 31 | ||
| 32 | public function testArgument() |
|
| 33 | { |
|
| 34 | $this->markTestIncomplete(); // Test does not work any more with Symfony 3.4 |
|
| 35 | ||
| 36 | $client = static::createClient(); |
|
| 37 | ||
| 38 | $crawler = $client->request('GET', '/argument'); |
|
| 39 | ||
| 40 | $this->assertSame( |
|
| 41 | 200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK, |
|
| 42 | $client->getResponse()->getStatusCode() |
|
| 43 | ); |
|
| 44 | ||
| 45 | $this->assertContains('Hello Component!', $client->getResponse()->getContent()); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function testConstructor() |
|
| 49 | { |
|
| @@ 48-62 (lines=15) @@ | ||
| 45 | $this->assertContains('Hello Component!', $client->getResponse()->getContent()); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function testConstructor() |
|
| 49 | { |
|
| 50 | $this->markTestIncomplete(); // Test does not work any more with Symfony 3.4 |
|
| 51 | ||
| 52 | $client = static::createClient(); |
|
| 53 | ||
| 54 | $crawler = $client->request('GET', '/constructor'); |
|
| 55 | ||
| 56 | $this->assertSame( |
|
| 57 | 200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK, |
|
| 58 | $client->getResponse()->getStatusCode() |
|
| 59 | ); |
|
| 60 | ||
| 61 | $this->assertContains('Hello Component!', $client->getResponse()->getContent()); |
|
| 62 | } |
|
| 63 | } |
|
| 64 | ||