| 1 | <?php |
||
| 16 | public function testIndex() |
||
| 17 | { |
||
| 18 | $client = static::createClient(); |
||
| 19 | |||
| 20 | $crawler = $client->request('GET', '/'); |
||
| 21 | |||
| 22 | $this->assertSame( |
||
| 23 | 200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK, |
||
| 24 | $client->getResponse()->getStatusCode() |
||
| 25 | ); |
||
| 26 | |||
| 27 | $this->assertContains('Hello World!', $client->getResponse()->getContent()); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |
This check looks for classes that have been defined more than once.
If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.
This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.