public function testGetPublicationDate()
 {
     $publicationDate = $this->article->getPublicationDate();
     $this->assertInstanceOf('\\Cekurte\\WebScrapingBundle\\Selector\\SelectorInterface', $publicationDate);
     $this->assertEquals('article .article-header .byline time.timestamp', $publicationDate->getSelectorKey());
     $this->assertEquals(SelectorBuilder::NODE_ATTR, $publicationDate->getSelectorType());
     $this->assertEquals('datetime', $publicationDate->getSelectorAttr());
 }
 /**
  * @inheritdoc
  */
 public function getPublicationDate()
 {
     $dateStr = SelectorResolver::create()->resolve($this->crawler, $this->selector->getPublicationDate())->getSingleResult();
     return \DateTime::createFromFormat('Y-m-d', $dateStr);
 }