Skip to content

Commit 90dd0f7

Browse files
committed
Actualize Saucer v8 API
1 parent 0d410ed commit 90dd0f7

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tests/WeakClosureTest.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
declare(strict_types=1);
44

5+
namespace Boson\Component\WeakType\Tests;
6+
57
use Boson\Component\WeakType\Tests\WeakClosureTest\ParentStub;
68
use Boson\Component\WeakType\Tests\WeakClosureTest\StaticStub;
79
use Boson\Component\WeakType\WeakClosure;
10+
use PHPUnit\Framework\Attributes\Group;
811
use PHPUnit\Framework\TestCase;
912

13+
#[Group('boson-php/weak-types')]
1014
final class WeakClosureTest extends TestCase
1115
{
1216
public function testCreateReturnsSameInstance(): void
@@ -47,7 +51,7 @@ public function foo(): int
4751

4852
gc_collect_cycles();
4953

50-
$this->expectException(RuntimeException::class);
54+
$this->expectException(\RuntimeException::class);
5155
$closure();
5256
}
5357

@@ -59,7 +63,7 @@ protected function foo(): int
5963
return 123;
6064
}
6165

62-
public function get(): Closure
66+
public function get(): \Closure
6367
{
6468
return $this->foo(...);
6569
}
@@ -74,7 +78,7 @@ public function testInheritedMethodAfterGarbageCollection(): void
7478
{
7579
$closure = (function () {
7680
$object = new class extends ParentStub {
77-
public function get(): Closure
81+
public function get(): \Closure
7882
{
7983
return $this->value(...);
8084
}
@@ -85,7 +89,7 @@ public function get(): Closure
8589

8690
gc_collect_cycles();
8791

88-
$this->expectException(RuntimeException::class);
92+
$this->expectException(\RuntimeException::class);
8993
$closure();
9094
}
9195

@@ -120,9 +124,9 @@ public function foo(): int { return 1; }
120124

121125
try {
122126
$closure();
123-
} catch (RuntimeException) {}
127+
} catch (\RuntimeException) {}
124128

125-
$this->expectException(RuntimeException::class);
129+
$this->expectException(\RuntimeException::class);
126130
$closure();
127131
}
128132

0 commit comments

Comments
 (0)