public function testGetTwitter() { $twitter = $this->author->getTwitter(); $this->assertInstanceOf('\\Cekurte\\WebScrapingBundle\\Selector\\SelectorInterface', $twitter); $this->assertEquals('article .article-header .twitter-handle a', $twitter->getSelectorKey()); $this->assertEquals(SelectorBuilder::NODE_TEXT, $twitter->getSelectorType()); }
/** * @inheritdoc */ public function getTwitter() { return SelectorResolver::create()->resolve($this->crawler, $this->selector->getTwitter())->getSingleResult(); }