J. King
1 year ago
3 changed files with 25 additions and 1 deletions
@ -0,0 +1,24 @@ |
|||
<?php |
|||
/** @license MIT |
|||
* Copyright 2023 J. King |
|||
* See LICENSE and AUTHORS files for details */ |
|||
|
|||
declare(strict_types=1); |
|||
namespace MensBeam\Microformats\TestCase; |
|||
|
|||
use MensBeam\Microformats; |
|||
|
|||
/** |
|||
* @covers MensBeam\Microformats |
|||
*/ |
|||
class MicroformatsTest extends \PHPUnit\Framework\TestCase { |
|||
public function testSerializeToJson(): void { |
|||
$exp = '{"items":[{"type":["h-card"],"properties":{}}],"rels":{},"rel-urls":{}}'; |
|||
$act = Microformats::toJson(Microformats::fromString('<div class="vcard"></div>', "", "")); |
|||
$this->assertSame($exp, $act); |
|||
} |
|||
|
|||
public function testParseMissingFile(): void { |
|||
$this->assertNull(@Microformats::fromFile("THIS FILE DOES NOT EXIST", "", "")); |
|||
} |
|||
} |
Loading…
Reference in new issue