getRepository('/does/not/exist', false); } public function testRepositoryOpenOnFile() { $c = $this->getRepository(__FILE__, false); $this->assertInstanceOf('TQ\Git\Repository\Repository', $c); $this->assertEquals(PROJECT_PATH, $c->getRepositoryPath()); } /** * @expectedException InvalidArgumentException */ public function testRepositoryOpenOnNonRepositoryPath() { $c = $this->getRepository('/usr', false); } public function testRepositoryOpenOnRepositoryPath() { $c = $this->getRepository(TESTS_REPO_PATH_1, false); $this->assertInstanceOf('TQ\Git\Repository\Repository', $c); } public function testRepositoryCreateOnExistingRepositoryPath() { $c = $this->getRepository(TESTS_REPO_PATH_1, 0755); $this->assertInstanceOf('TQ\Git\Repository\Repository', $c); } public function testRepositoryCreateOnFile() { $c = $this->getRepository(__FILE__, 0755); $this->assertInstanceOf('TQ\Git\Repository\Repository', $c); $this->assertEquals(PROJECT_PATH, $c->getRepositoryPath()); } public function testRepositoryCreateOnExistingPath() { $c = $this->getRepository(TESTS_REPO_PATH_2, 0755); $this->assertInstanceOf('TQ\Git\Repository\Repository', $c); } public function testRepositoryCreateOnCreateablePath() { $c = $this->getRepository(TESTS_REPO_PATH_3, 0755); $this->assertInstanceOf('TQ\Git\Repository\Repository', $c); } }