public function testImmutableOption() { $expectedLang = 'fr'; $this->twitter->setOptions(new Twitter\SearchOptions(array('language' => $expectedLang))); $options = $this->twitter->getOptions(); $options->setLanguage('en'); $actualOptions = $this->twitter->getOptions(); $this->assertEquals($expectedLang, $actualOptions->getLanguage()); }
public function testJsonSearchReturnTwentyResultsReturnsArray() { $this->twitter->setResponseType('json'); $response = $this->twitter->execute('php', array('rpp' => '20', 'lang' => 'en', 'result_type' => 'recent', 'include_entities' => false)); $this->assertNotEquals(20, $this->twitter->getOptions()->getResultsPerPage()); $this->assertInternalType('array', $response); $this->assertEquals(count($response['results']), 20); }