Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rande committed Dec 4, 2013
1 parent 006121d commit 5286ab1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
9 changes: 8 additions & 1 deletion Tests/Provider/DailyMotionProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ public function testProvider()

public function testThumbnail()
{
$provider = $this->getProvider();
$response = $this->getMock('Buzz\Message\MessageInterface');
$response->expects($this->once())->method('getContent')->will($this->returnValue('content'));

$browser = $this->getMockBuilder('Buzz\Browser')->getMock();

$browser->expects($this->once())->method('get')->will($this->returnValue($response));

$provider = $this->getProvider($browser);

$media = new Media;
$media->setName('les tests fonctionnels - Symfony Live 2009');
Expand Down
9 changes: 8 additions & 1 deletion Tests/Provider/VimeoProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ public function testProvider()

public function testThumbnail()
{
$provider = $this->getProvider();
$response = $this->getMock('Buzz\Message\MessageInterface');
$response->expects($this->once())->method('getContent')->will($this->returnValue('content'));

$browser = $this->getMockBuilder('Buzz\Browser')->getMock();

$browser->expects($this->once())->method('get')->will($this->returnValue($response));

$provider = $this->getProvider($browser);

$media = new Media;
$media->setName('Blinky™');
Expand Down
9 changes: 8 additions & 1 deletion Tests/Provider/YouTubeProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,15 @@ public function testProvider()

public function testThumbnail()
{
$provider = $this->getProvider();
$response = $this->getMock('Buzz\Message\MessageInterface');
$response->expects($this->once())->method('getContent')->will($this->returnValue('content'));

$browser = $this->getMockBuilder('Buzz\Browser')->getMock();

$browser->expects($this->once())->method('get')->will($this->returnValue($response));

$provider = $this->getProvider($browser);

$media = new Media;
$media->setProviderName('youtube');
$media->setProviderReference('BDYAbAtaDzA');
Expand Down

0 comments on commit 5286ab1

Please sign in to comment.