Skip to content

Commit 37a0406

Browse files
committed
test: fix UndefinedVariable
Error: tests/system/Test/TestCaseTest.php:57:56: UndefinedVariable: Cannot find referenced variable $result (see https://psalm.dev/024)
1 parent 7a89ef2 commit 37a0406

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/system/Test/TestCaseTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@ public function testAssertLogContains(): void
5454

5555
public function testEventTriggering(): void
5656
{
57+
$result = '';
58+
5759
Events::on('foo', static function ($arg) use (&$result): void {
5860
$result = $arg;
5961
});
6062

6163
Events::trigger('foo', 'bar');
6264

6365
$this->assertEventTriggered('foo');
66+
$this->assertSame('bar', $result);
6467
}
6568

6669
public function testStreamFilter(): void

0 commit comments

Comments
 (0)