controllersTest.php 765 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. use Silex\WebTestCase;
  3. class controllersTest extends WebTestCase
  4. {
  5. public function createApplication()
  6. {
  7. $app = require __DIR__ . '/../src/app.php';
  8. require __DIR__ . '/../config/dev.php';
  9. require __DIR__ . '/../src/controllers.php';
  10. $app['session.test'] = true;
  11. return $this->app = $app;
  12. }
  13. public function testOk()
  14. {
  15. $this->assertEquals(1, 1);
  16. }
  17. // public function testGetHomepage()
  18. // {
  19. // $client = $this->createClient();
  20. // $client->followRedirects(true);
  21. // $crawler = $client->request('GET', '/');
  22. //
  23. // $this->assertTrue($client->getResponse()->isOk());
  24. // $this->assertContains('Welcome', $crawler->filter('body')->text());
  25. // }
  26. }