Skip to content

Commit

Permalink
test on multiple getParents on log
Browse files Browse the repository at this point in the history
  • Loading branch information
matteosister committed Jun 8, 2013
1 parent 15cba0a commit 19dd17e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ todo

1.0.0
* remotes DONE
* better status handling with --porcelain
* better status handling with --porcelain DONE
* CommitCollection instead of countable
* tag messages and signed tags
* named exceptions

Expand Down
14 changes: 14 additions & 0 deletions tests/GitElephant/Objects/LogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ public function testParents()
$lastCommit = $this->repository->getCommit();
$lastLogCommit = $log[0];
$this->assertEquals($lastCommit->getParents(), $lastLogCommit->getParents());
Branch::create($this->repository, 'new-branch');
$this->getRepository()->checkout('new-branch');
$this->addFile('another file');
$this->repository->commit('another commit', true);
$lastCommitOtherBranch = $this->getRepository()->getCommit();
$this->getRepository()->checkout('master');
$this->addFile('another file on master');
$this->getRepository()->commit('new commit on master', true);
$lastCommitOnMaster = $this->getRepository()->getCommit();
$this->getRepository()->merge($this->getRepository()->getBranch('new-branch'));
$log = $this->getRepository()->getLog();
$lastLogCommit = $log[0];
$this->assertContains($lastCommitOnMaster->getSha(), $lastLogCommit->getParents());
$this->assertContains($lastCommitOtherBranch->getSha(), $lastLogCommit->getParents());
}

/**
Expand Down

0 comments on commit 19dd17e

Please sign in to comment.