First functional test for interface

This commit is contained in:
Klaus Silveira
2012-07-25 11:46:20 -03:00
parent 611b1ab7de
commit 11b869f28e

24
tests/InterfaceTest.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
require 'vendor/autoload.php';
use Silex\WebTestCase;
class InterfaceTest extends WebTestCase
{
public function createApplication()
{
$app = require 'index.php';
$app['debug'] = true;
return $app;
}
public function testInitialPage()
{
$client = $this->createClient();
$crawler = $client->request('GET', '/');
$this->assertTrue($client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('title:contains("Gitlist")'));
}
}