Knp\Bundle\KnpBundlesBundle\Tests\Github\DeveloperTest::testUpdateBadUrl PHP Method

testUpdateBadUrl() public method

public testUpdateBadUrl ( )
    public function testUpdateBadUrl()
    {
        $output = $this->getMock('Symfony\\Component\\Console\\Output\\OutputInterface');
        $data = array('blog' => 'knplabs.com');
        $github = $this->getMock('Github\\Client', array('api'));
        $githubDeveloperApi = $this->getMock('Github\\Api\\User', array('show'), array($github));
        $githubDeveloperApi->expects($this->any())->method('show')->with($this->equalTo('lorem'))->will($this->returnValue($data));
        $github->expects($this->any())->method('api')->with('user')->will($this->returnValue($githubDeveloperApi));
        $userEntity = new DeveloperEntity();
        $userEntity->setName('lorem');
        $githubDeveloper = new GithubDeveloper($github, $output);
        $githubDeveloper->update($userEntity);
        $this->assertEquals('http://knplabs.com', $userEntity->getUrl());
    }