mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
e59670ef68
* Add documention to LSP Add descriptions for all Classes, Functions, Methods, Class Constants for LSP methods for Hover, SignatureInformation and Completions * Descriptions for class name completions * PHPCS * Fix docblock being overriden * Remove trailing comma in args * Add description to function param before early `continue` * Update php-language-server-protocol to 1.5 * Break up long array docblocks * Break up docblock onto newline Co-authored-by: Matthew Brown <github@muglug.com>
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);
|
|
}
|
|
}
|