diff --git a/tests/InterfaceTest.php b/tests/InterfaceTest.php index 0a600e8..99a97b9 100644 --- a/tests/InterfaceTest.php +++ b/tests/InterfaceTest.php @@ -80,12 +80,17 @@ class InterfaceTest extends WebTestCase $repository->checkout("master"); // master-less repository fixture - $git->createRepository(self::$tmpdir . 'masterless'); - $repository = $git->getRepository(self::$tmpdir . 'masterless'); + $git->createRepository(self::$tmpdir . 'develop'); + $repository = $git->getRepository(self::$tmpdir . '/develop'); + $repository->setConfig('user.name', 'Luke Skywalker'); + $repository->setConfig('user.email', 'luke@rebel.org'); + file_put_contents(self::$tmpdir . 'develop/README.md', "## develop\ndevelop is a *test* repository!"); + $repository->addAll(); + $repository->commit("First commit"); $repository->createBranch("develop"); $repository = $repository->checkout('develop'); - file_put_contents(self::$tmpdir . 'masterless/README.md', "## masterless\nmasterless is a *test* repository!"); - file_put_contents(self::$tmpdir . 'masterless/test.php', "setConfig('user.name', 'Luke Skywalker'); $repository->setConfig('user.email', 'luke@rebel.org'); $repository->addAll(); @@ -121,8 +126,8 @@ class InterfaceTest extends WebTestCase $this->assertEquals('/nested/NestedRepo/master/rss/', $crawler->filter('.repository-header a')->eq(3)->attr('href')); $this->assertCount(1, $crawler->filter('div.repository-header:contains("foobar")')); $this->assertCount(1, $crawler->filter('div.repository-body:contains("This is a test repo!")')); - $this->assertEquals('/foobar/', $crawler->filter('.repository-header a')->eq(4)->attr('href')); - $this->assertEquals('/foobar/master/rss/', $crawler->filter('.repository-header a')->eq(5)->attr('href')); + $this->assertEquals('/foobar/', $crawler->filter('.repository-header a')->eq(6)->attr('href')); + $this->assertEquals('/foobar/master/rss/', $crawler->filter('.repository-header a')->eq(7)->attr('href')); } public function testRepositoryPage() @@ -252,11 +257,11 @@ class InterfaceTest extends WebTestCase $this->assertRegexp('/NESTED TEST REPO README/', $client->getResponse()->getContent()); } - public function testMasterlessRepo() + public function testDevelopRepo() { $client = $this->createClient(); - $crawler = $client->request('GET', '/masterless/'); + $crawler = $client->request('GET', '/develop/'); $this->assertTrue($client->getResponse()->isOk()); }