Page MenuHomeDevCentral

TagTest.php
No OneTemporary

TagTest.php

<?php
namespace Keruald\Yaml\Tests\Tags;
use Keruald\Yaml\Tags\Tag;
use PHPUnit\Framework\TestCase;
class TagTest extends TestCase {
public static function provideTag () : Tag {
return new class () extends Tag {
public function getPrimaryTag () : string {
return "tag:example.com,2000:test";
}
public function getPrivateTag () : string {
return "test";
}
public function handle (mixed $data) : string {
return "";
}
};
}
public function testRegister () {
$handlers = [];
$tag = self::provideTag();
$tag->register($handlers);
$this->assertArrayHasKey("tag:example.com,2000:test", $handlers);
$this->assertArrayHasKey("test", $handlers);
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Jun 8, 08:03 (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3759343
Default Alt Text
TagTest.php (842 B)

Event Timeline