示例#1
0
 public function testIsFastForwardable_bothChanged()
 {
     $upstream = $this->createUpstreamRepo();
     ProcessUtil::runOk($this->command("", "git clone file://{$upstream->getPath()} downstream -b master"));
     $downstream = new GitRepo($this->fixturePath . '/downstream');
     $this->assertEquals("example text", $downstream->readFile("example.txt"));
     $upstream->commitFile('example-from-upstream.txt', 'upstream change example');
     $downstream->commitFile('example-from-downstream.txt', 'downstream change example');
     $this->assertEquals(FALSE, $downstream->isLocalFastForwardable(TRUE));
     $this->assertIsCommit($upstream->getCommit());
     $this->assertIsCommit($downstream->getCommit());
     $this->assertNotEquals($upstream->getCommit(), $downstream->getCommit());
 }