public function testRemoveQuotes() { $this->assertEquals('foo', Util::removeQuotes('"foo"')); $this->assertEquals('foo', Util::removeQuotes("'foo'")); $this->assertEquals('"foo\'', Util::removeQuotes("\"foo'")); $this->assertEquals('f"o"o', Util::removeQuotes('f"o"o')); }
/** * Provides :contains-exactly QueryPath pseudoclass. * * This is an EXACT match. */ protected function containsExactly($node, $value) { $text = $node->textContent; $value = Util::removeQuotes($value); return isset($text) && $text == $value; }