Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/phpgt/dom/test/phpunit/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/phpgt/dom/test/phpunit/LivePropertyTest.php
<?php
namespace Gt\Dom\Test;

use Gt\Dom\HTMLDocument;
use Gt\Dom\Test\Helper\ExampleLiveProperty;
use Gt\Dom\Test\Helper\Helper;
use PHPUnit\Framework\TestCase;

class LivePropertyTest extends TestCase {
	/**
	 * This assertion shows that because of the LiveProperty trait,
	 * the non-existent attribute "children" is in fact callable, because of the
	 * prop_children function.
	 */
	public function testLiveProperty() {
		$document = new HTMLDocument(Helper::HTML);
		$this->assertObjectNotHasAttribute("children", $document);
		$this->assertNotEmpty($document->children);
	}

	/**
	 * We can add a magic __get method of our own, which should still be
	 * compatible with the trait's.
	 */
	public function testGetterOnClass() {
		$t = new ExampleLiveProperty();
		$this->assertEquals("from __get overload", $t->overload);
		$this->assertEquals("from prop_example", $t->example);
	}
}

Spamworldpro Mini