HtmlDomTest.php 593 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Tools\Test\TestCase\HtmlDom;
  3. use Shim\TestSuite\TestCase;
  4. use Tools\HtmlDom\HtmlDom;
  5. class HtmlDomTest extends TestCase {
  6. /**
  7. * @var \Tools\HtmlDom\HtmlDom
  8. */
  9. protected $HtmlDom;
  10. /**
  11. * @return void
  12. */
  13. public function setUp(): void {
  14. parent::setUp();
  15. $this->skipIf(true, 'Broken');
  16. }
  17. /**
  18. * HtmlDom test
  19. *
  20. * @return void
  21. */
  22. public function testBasics() {
  23. $this->HtmlDom = new HtmlDom('<div id="hello">Hello</div><div id="world">World</div>');
  24. $result = $this->HtmlDom->find('div', 1)->innertext;
  25. $this->assertSame('World', $result);
  26. }
  27. }