AbstractNodeTest.php 962 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\CssSelector\Tests\Node;
  11. use Symfony\Component\CssSelector\Node\NodeInterface;
  12. abstract class AbstractNodeTest extends \PHPUnit_Framework_TestCase
  13. {
  14. /** @dataProvider getToStringConversionTestData */
  15. public function testToStringConversion(NodeInterface $node, $representation)
  16. {
  17. $this->assertEquals($representation, (string) $node);
  18. }
  19. /** @dataProvider getSpecificityValueTestData */
  20. public function testSpecificityValue(NodeInterface $node, $value)
  21. {
  22. $this->assertEquals($value, $node->getSpecificity()->getValue());
  23. }
  24. abstract public function getToStringConversionTestData();
  25. abstract public function getSpecificityValueTestData();
  26. }