mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 17:52:45 +01:00
28 lines
745 B
PHP
28 lines
745 B
PHP
|
<?php
|
||
|
namespace Psalm\Tests;
|
||
|
|
||
|
use PHPUnit\Framework\TestCase as BaseTestCase;
|
||
|
use Psalm\Aliases;
|
||
|
use Psalm\DocComment;
|
||
|
use Psalm\Internal\RuntimeCaches;
|
||
|
use Psalm\Internal\Scanner\ParsedDocblock;
|
||
|
use Psalm\Internal\PhpVisitor\Reflector\ClassLikeDocblockParser;
|
||
|
use PhpParser\Node\Stmt\Class_;
|
||
|
|
||
|
class ClassLikeDocblockParserTest extends \Psalm\Tests\TestCase
|
||
|
{
|
||
|
public function testDocblockDescription(): void
|
||
|
{
|
||
|
$doc = '/**
|
||
|
* Some Description
|
||
|
*
|
||
|
*/
|
||
|
';
|
||
|
$node = new Class_(null);
|
||
|
$php_parser_doc = new \PhpParser\Comment\Doc($doc);
|
||
|
$class_docblock = ClassLikeDocblockParser::parse($node, $php_parser_doc, new Aliases());
|
||
|
|
||
|
$this->assertSame('Some Description', $class_docblock->description);
|
||
|
}
|
||
|
}
|