コード例 #1
0
 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());
 }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public function getTwitter()
 {
     return SelectorResolver::create()->resolve($this->crawler, $this->selector->getTwitter())->getSingleResult();
 }