| 123456789101112131415161718192021222324252627282930 |
- <?php
- namespace Tools\TestCase\HtmlDom;
- use Tools\HtmlDom\HtmlDom;
- use Tools\TestSuite\TestCase;
- use Cake\Core\Configure;
- class HtmlDomTest extends TestCase {
- public $HtmlDom = null;
- public function setUp() {
- parent::setUp();
- $this->skipIf(!class_exists('Yangqi\Htmldom\Htmldom'));
- }
- /**
- * HtmlDom test
- *
- * @return void
- */
- public function testBasics() {
- $html = new HtmlDom('<div id="hello">Hello</div><div id="world">World</div>');
- $result = $html->find('div', 1)->innertext;
- $this->assertSame('World', $result);
- }
- }
|