Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing broken tests

  • Loading branch information...
commit 179aeeff218d505e8e2da6dde0939a95cd11d01e 1 parent 1d436be
@klaussilveira authored
Showing with 19 additions and 6 deletions.
  1. +19 −6 tests/InterfaceTest.php
View
25 tests/InterfaceTest.php
@@ -136,15 +136,28 @@ public function testInitialPage()
$this->assertTrue($client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('title:contains("GitList")'));
+
$this->assertCount(1, $crawler->filter('div.repository-header a:contains("GitTest")'));
$this->assertEquals('/GitTest/', $crawler->filter('.repository-header a')->eq(0)->attr('href'));
$this->assertEquals('/GitTest/master/rss/', $crawler->filter('.repository-header a')->eq(1)->attr('href'));
- $this->assertEquals('/NestedRepo/', $crawler->filter('.repository-header a')->eq(2)->attr('href'));
- $this->assertEquals('/NestedRepo/master/rss/', $crawler->filter('.repository-header a')->eq(3)->attr('href'));
+
+ $this->assertCount(1, $crawler->filter('div.repository-header a:contains("detached-head")'));
+ $this->assertEquals('/detached-head/', $crawler->filter('.repository-header a')->eq(2)->attr('href'));
+ $this->assertEquals('/detached-head/master/rss/', $crawler->filter('.repository-header a')->eq(3)->attr('href'));
+
+ $this->assertCount(1, $crawler->filter('div.repository-header a:contains("develop")'));
+ $this->assertEquals('/develop/', $crawler->filter('.repository-header a')->eq(4)->attr('href'));
+ $this->assertEquals('/develop/master/rss/', $crawler->filter('.repository-header a')->eq(5)->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(8)->attr('href'));
- $this->assertEquals('/foobar/master/rss/', $crawler->filter('.repository-header a')->eq(9)->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'));
+
+ $this->assertCount(1, $crawler->filter('div.repository-header a:contains("nested/NestedRepo")'));
+ $this->assertEquals('/nested/NestedRepo/', $crawler->filter('.repository-header a')->eq(8)->attr('href'));
+ $this->assertEquals('/nested/NestedRepo/master/rss/', $crawler->filter('.repository-header a')->eq(9)->attr('href'));
+ $this->assertCount(1, $crawler->filter('div.repository-body:contains("This is a NESTED test repo!")'));
}
public function testRepositoryPage()
@@ -277,7 +290,7 @@ public function testNestedRepoPage()
{
$client = $this->createClient();
- $client->request('GET', '/NestedRepo/');
+ $client->request('GET', '/nested/NestedRepo/');
$response = $client->getResponse();
$this->assertTrue($response->isOk());
@@ -296,7 +309,7 @@ public function testNestedRepoBranch()
{
$client = $this->createClient();
- $crawler = $client->request('GET', '/NestedRepo/testing/');
+ $crawler = $client->request('GET', '/nested/NestedRepo/testing/');
$this->assertTrue($client->getResponse()->isOk());
$this->assertRegexp('/NESTED TEST BRANCH README/', $client->getResponse()->getContent());
}
Please sign in to comment.
Something went wrong with that request. Please try again.