mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
First functional test for interface
This commit is contained in:
24
tests/InterfaceTest.php
Normal file
24
tests/InterfaceTest.php
Normal 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")'));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user