1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

added test for multiline templates (#5282)

This commit is contained in:
elnoro 2021-02-26 03:42:20 +05:00 committed by GitHub
parent ed6fdaaca9
commit fff32d0443
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3322,6 +3322,27 @@ class ClassTemplateTest extends TestCase
takesA($a);
}',
],
'templateIsAComplexMultilineType' => [
'<?php
/**
* @template T of array{
* a: string,
* b: int
* }
*/
class MyContainer {
/** @var T */
private $value;
/** @param T $value */
public function __construct($value) {
$this->value = $value;
}
/** @return T */
public function getValue() {
return $this->value;
}
}'
],
];
}