Skip to content

Instantly share code, notes, and snippets.

@cursedcoder
Created April 5, 2012 11:39
Show Gist options
  • Save cursedcoder/2310130 to your computer and use it in GitHub Desktop.
Save cursedcoder/2310130 to your computer and use it in GitHub Desktop.
public function testExample()
{
$fixture = json_encode(array(
'one' => array('id_str' => 1, 'text' => 'asdasdasd'),
'two' => array('id_str' => 2, 'text' => 'asdasdasd2'),
'three' => array('id_str' => 3, 'text' => 'asdasdasd3')
));
$mockedBrowser = $this->getMock(
'Buzz\Browser',
array('get')
);
$mockedBrowser->expects($this->exactly(2))
->method('get')
->will($this->returnValue($fixture));
$fetcher = new Twitter\LastTweetsFetcher\ApiFetcher($mockedBrowser);
$tweets = $fetcher->fetch(array('knplabs', 'knplabsru'), 3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment