File: InvalidElementTest.php

package info (click to toggle)
phpdox 0.12.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 7,672 kB
  • sloc: xml: 80,724; php: 9,167; makefile: 13
file content (31 lines) | stat: -rw-r--r-- 910 bytes parent folder | download | duplicates (2)
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))
        );
    }
}