1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
<?php declare(strict_types = 1);
namespace TheSeer\phpDox\Tests\Unit\DocBlock;
use TheSeer\fDOM\fDOMDocument;
use TheSeer\phpDox\DocBlock\InvalidElement;
/**
* Class InvalidElementTest
*
* @covers \TheSeer\phpDox\DocBlock\InvalidElement
*
* @uses \TheSeer\phpDox\DocBlock\InvalidElement
* @uses \TheSeer\phpDox\DocBlock\GenericElement
*/
class InvalidElementTest extends \PHPUnit\Framework\TestCase {
/**
* @covers \TheSeer\phpDox\DocBlock\InvalidElement::asDom
*/
public function testElementCanBeSerializedToDom(): void {
$dom = new fDOMDocument();
$element = new InvalidElement(
$this->createMock(\TheSeer\phpDox\DocBlock\Factory::class),
'test'
);
$this->assertEquals(
'<invalid xmlns="http://xml.phpdox.net/src" annotation="test"/>',
$dom->saveXML($element->asDom($dom))
);
}
}
|