mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-12-12 09:09:47 +01:00
33 lines
541 B
PHP
33 lines
541 B
PHP
|
<?php declare(strict_types = 1);
|
||
|
|
||
|
namespace PHPStan\PhpDocParser\Ast\PhpDoc;
|
||
|
|
||
|
use PHPStan\PhpDocParser\Ast\Node;
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
final class NodePrintTest extends TestCase
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* @dataProvider providePhpDocData
|
||
|
*/
|
||
|
public function testPrintMultiline(Node $node, string $expectedPrinted): void
|
||
|
{
|
||
|
$this->assertSame($expectedPrinted, (string) $node);
|
||
|
}
|
||
|
|
||
|
|
||
|
public function providePhpDocData(): \Iterator
|
||
|
{
|
||
|
yield [
|
||
|
new PhpDocNode([
|
||
|
new PhpDocTextNode('It works'),
|
||
|
]),
|
||
|
'/**
|
||
|
* It works
|
||
|
*/',
|
||
|
];
|
||
|
}
|
||
|
|
||
|
}
|