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

shouldUpdateVersionsHistory() public method

    public function shouldUpdateVersionsHistory()
    {
        $json = array('package' => array('versions' => array(array('name' => 'symfony/framework-bundle', 'require' => array('symfony/framework-bundle' => 'dev-master', 'symfony/symfony' => 'dev-master')), array('name' => 'symfony/framework-bundle', 'require' => array('symfony/framework-bundle' => '>=2.0,<2.2-dev', 'symfony/symfony' => '>=2.0,<2.2-dev')))));
        $bundle = new Bundle('KnpLabs/KnpMenuBundle');
        $bundle->setComposerName('knplabs/knp-menu-bundle');
        $httpClient = $this->getMockBuilder('Github\\HttpClient\\HttpClient')->setMethods(array('get'))->disableOriginalConstructor()->getMock();
        $httpClient->expects($this->once())->method('get')->will($this->returnValue($json));
        $githubRepo = $this->getRepo($httpClient);
        $githubRepo->updateVersionsHistory($bundle);
        $versionsHistory = $bundle->getVersionsHistory();
        $this->assertCount(2, $versionsHistory['symfony']);
    }