"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

TranslatorTest.php  (phplist-3.4.5.tgz):TranslatorTest.php  (phplist-3.4.6.tgz)
skipping to change at line 38 skipping to change at line 38
} }
/** @dataProvider getCssToXPathTestData */ /** @dataProvider getCssToXPathTestData */
public function testCssToXPath($css, $xpath) public function testCssToXPath($css, $xpath)
{ {
$translator = new Translator(); $translator = new Translator();
$translator->registerExtension(new HtmlExtension($translator)); $translator->registerExtension(new HtmlExtension($translator));
$this->assertEquals($xpath, $translator->cssToXPath($css, '')); $this->assertEquals($xpath, $translator->cssToXPath($css, ''));
} }
/**
* @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErr
orException
*/
public function testCssToXPathPseudoElement() public function testCssToXPathPseudoElement()
{ {
$this->expectException('Symfony\Component\CssSelector\Exception\Expressi onErrorException');
$translator = new Translator(); $translator = new Translator();
$translator->registerExtension(new HtmlExtension($translator)); $translator->registerExtension(new HtmlExtension($translator));
$translator->cssToXPath('e::first-line'); $translator->cssToXPath('e::first-line');
} }
/**
* @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErr
orException
*/
public function testGetExtensionNotExistsExtension() public function testGetExtensionNotExistsExtension()
{ {
$this->expectException('Symfony\Component\CssSelector\Exception\Expressi onErrorException');
$translator = new Translator(); $translator = new Translator();
$translator->registerExtension(new HtmlExtension($translator)); $translator->registerExtension(new HtmlExtension($translator));
$translator->getExtension('fake'); $translator->getExtension('fake');
} }
/**
* @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErr
orException
*/
public function testAddCombinationNotExistsExtension() public function testAddCombinationNotExistsExtension()
{ {
$this->expectException('Symfony\Component\CssSelector\Exception\Expressi onErrorException');
$translator = new Translator(); $translator = new Translator();
$translator->registerExtension(new HtmlExtension($translator)); $translator->registerExtension(new HtmlExtension($translator));
$parser = new Parser(); $parser = new Parser();
$xpath = $parser->parse('*')[0]; $xpath = $parser->parse('*')[0];
$combinedXpath = $parser->parse('*')[0]; $combinedXpath = $parser->parse('*')[0];
$translator->addCombination('fake', $xpath, $combinedXpath); $translator->addCombination('fake', $xpath, $combinedXpath);
} }
/**
* @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErr
orException
*/
public function testAddFunctionNotExistsFunction() public function testAddFunctionNotExistsFunction()
{ {
$this->expectException('Symfony\Component\CssSelector\Exception\Expressi onErrorException');
$translator = new Translator(); $translator = new Translator();
$translator->registerExtension(new HtmlExtension($translator)); $translator->registerExtension(new HtmlExtension($translator));
$xpath = new XPathExpr(); $xpath = new XPathExpr();
$function = new FunctionNode(new ElementNode(), 'fake'); $function = new FunctionNode(new ElementNode(), 'fake');
$translator->addFunction($xpath, $function); $translator->addFunction($xpath, $function);
} }
/**
* @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErr
orException
*/
public function testAddPseudoClassNotExistsClass() public function testAddPseudoClassNotExistsClass()
{ {
$this->expectException('Symfony\Component\CssSelector\Exception\Expressi onErrorException');
$translator = new Translator(); $translator = new Translator();
$translator->registerExtension(new HtmlExtension($translator)); $translator->registerExtension(new HtmlExtension($translator));
$xpath = new XPathExpr(); $xpath = new XPathExpr();
$translator->addPseudoClass($xpath, 'fake'); $translator->addPseudoClass($xpath, 'fake');
} }
/**
* @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErr
orException
*/
public function testAddAttributeMatchingClassNotExistsClass() public function testAddAttributeMatchingClassNotExistsClass()
{ {
$this->expectException('Symfony\Component\CssSelector\Exception\Expressi onErrorException');
$translator = new Translator(); $translator = new Translator();
$translator->registerExtension(new HtmlExtension($translator)); $translator->registerExtension(new HtmlExtension($translator));
$xpath = new XPathExpr(); $xpath = new XPathExpr();
$translator->addAttributeMatching($xpath, '', '', ''); $translator->addAttributeMatching($xpath, '', '', '');
} }
/** @dataProvider getXmlLangTestData */ /** @dataProvider getXmlLangTestData */
public function testXmlLang($css, array $elementsId) public function testXmlLang($css, array $elementsId)
{ {
$translator = new Translator(); $translator = new Translator();
 End of changes. 12 change blocks. 
24 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)