Skip to content

Commit c72d12f

Browse files
committed
Add test
1 parent 2f33a2f commit c72d12f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

tests/Fixer/PhpdocSelfAccessorFixerTest.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,5 +240,38 @@ public function baz(array $a) {}
240240
}
241241
',
242242
];
243+
244+
yield [
245+
<<<'PHP'
246+
<?php class Foo
247+
{
248+
/**
249+
* @return array{Foo: self}
250+
*/
251+
public function f1() {}
252+
/**
253+
* @return array{
254+
* Foo: self
255+
* }
256+
*/
257+
public function f2() {}
258+
}
259+
PHP,
260+
<<<'PHP'
261+
<?php class Foo
262+
{
263+
/**
264+
* @return array{Foo: Foo}
265+
*/
266+
public function f1() {}
267+
/**
268+
* @return array{
269+
* Foo: Foo
270+
* }
271+
*/
272+
public function f2() {}
273+
}
274+
PHP,
275+
];
243276
}
244277
}

0 commit comments

Comments
 (0)