protected function getRepoWithMockedGitRepo(Bundle $bundle)
{
$githubMock = $this->getMock('Github\\Client');
$output = $this->getMock('Symfony\\Component\\Console\\Output\\OutputInterface');
$repoManager = $this->getMockBuilder('Knp\\Bundle\\KnpBundlesBundle\\Git\\RepoManager')->disableOriginalConstructor()->getMock();
$repoManager->expects($this->any())->method('getRepo')->with($bundle)->will($this->returnValue($this->getFullyMockedRepo($bundle->getName())));
return new Repo($githubMock, $output, $repoManager, new EventDispatcher(), $this->getOwnerManagerMock());
}