mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 19:20:56 +01:00
Add unit tests for nested repository
This commit is contained in:
@@ -72,6 +72,13 @@ class InterfaceTest extends WebTestCase
|
||||
$repository->setConfig('user.email', 'luke@rebel.org');
|
||||
$repository->addAll();
|
||||
$repository->commit("First commit");
|
||||
$repository->createBranch("testing");
|
||||
$repository->checkout("testing");
|
||||
file_put_contents($nested_dir . 'NestedRepo/README.txt', 'NESTED TEST BRANCH README');
|
||||
$repository->addAll();
|
||||
$repository->commit("Changing branch");
|
||||
$repository->checkout("master");
|
||||
|
||||
}
|
||||
|
||||
public function createApplication()
|
||||
@@ -225,6 +232,24 @@ class InterfaceTest extends WebTestCase
|
||||
$this->assertRegexp('/Initial commit/', $client->getResponse()->getContent());
|
||||
}
|
||||
|
||||
public function testNestedRepoPage()
|
||||
{
|
||||
$client = $this->createClient();
|
||||
|
||||
$crawler = $client->request('GET', '/nested/NestedRepo/');
|
||||
$this->assertTrue($client->getResponse()->isOk());
|
||||
$this->assertRegexp('/NESTED TEST REPO README/', $client->getResponse()->getContent());
|
||||
}
|
||||
|
||||
public function testNestedRepoBranch()
|
||||
{
|
||||
$client = $this->createClient();
|
||||
|
||||
$crawler = $client->request('GET', '/nested/NestedRepo/testing/');
|
||||
$this->assertTrue($client->getResponse()->isOk());
|
||||
$this->assertRegexp('/NESTED TEST BRANCH README/', $client->getResponse()->getContent());
|
||||
}
|
||||
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
$fs = new Filesystem();
|
||||
|
||||
Reference in New Issue
Block a user