菜谱项目

AbstractNodeTest.php 975B

1234567891011121314151617181920212223242526272829303132333435
  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 PHPUnit\Framework\TestCase;
  12. use Symfony\Component\CssSelector\Node\NodeInterface;
  13. abstract class AbstractNodeTest extends TestCase
  14. {
  15. /** @dataProvider getToStringConversionTestData */
  16. public function testToStringConversion(NodeInterface $node, $representation)
  17. {
  18. $this->assertEquals($representation, (string) $node);
  19. }
  20. /** @dataProvider getSpecificityValueTestData */
  21. public function testSpecificityValue(NodeInterface $node, $value)
  22. {
  23. $this->assertEquals($value, $node->getSpecificity()->getValue());
  24. }
  25. abstract public function getToStringConversionTestData();
  26. abstract public function getSpecificityValueTestData();
  27. }