Knp\Bundle\KnpBundlesBundle\Tests\Github\RepoTest::getRepoWithMockedGitRepo PHP Method

getRepoWithMockedGitRepo() protected method

protected getRepoWithMockedGitRepo ( Bundle $bundle )
$bundle Knp\Bundle\KnpBundlesBundle\Entity\Bundle
    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());
    }