Exemplo n.º 1
0
 public function testGetCharset()
 {
     $meta = $this->meta->getCharset();
     $this->assertInstanceOf('\\Cekurte\\WebScrapingBundle\\Selector\\SelectorInterface', $meta);
     $this->assertEquals('meta[name="charset"]', $meta->getSelectorKey());
     $this->assertEquals(SelectorBuilder::NODE_ATTR, $meta->getSelectorType());
     $this->assertEquals('content', $meta->getSelectorAttr());
 }
Exemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function getCharset()
 {
     return SelectorResolver::create()->resolve($this->crawler, $this->selector->getCharset())->getSingleResult();
 }