Skip to content

Commit ad8cd15

Browse files
authored
chore(reflection): fix failing tests (#1091)
1 parent 5fb1045 commit ad8cd15

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Tempest/Reflection/tests/ReflectionTypeTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
namespace Tempest\Reflection\Tests;
66

7+
use ArrayIterator;
78
use DateTimeImmutable;
89
use Generator;
910
use PHPUnit\Framework\Attributes\DataProvider;
1011
use PHPUnit\Framework\TestCase;
12+
use Stringable;
1113
use Tempest\Reflection\Tests\Fixtures\A;
1214
use Tempest\Reflection\Tests\Fixtures\B;
1315
use Tempest\Reflection\Tests\Fixtures\C;
@@ -75,16 +77,16 @@ public function test_is_enum(): void
7577

7678
public function test_is_iterable(): void
7779
{
78-
$this->assertTrue(new TypeReflector(ImmutableArray::class)->isIterable());
80+
$this->assertTrue(new TypeReflector(ArrayIterator::class)->isIterable());
7981
$this->assertTrue(new TypeReflector('array')->isIterable());
8082
$this->assertFalse(new TypeReflector('string')->isIterable());
8183
}
8284

8385
public function test_is_stringable(): void
8486
{
8587
$this->assertTrue(new TypeReflector('string')->isStringable());
86-
$this->assertTrue(new TypeReflector(ImmutableString::class)->isStringable());
87-
$this->assertFalse(new TypeReflector(ImmutableArray::class)->isStringable());
88+
$this->assertTrue(new TypeReflector(Stringable::class)->isStringable());
89+
$this->assertFalse(new TypeReflector(ArrayIterator::class)->isStringable());
8890
$this->assertFalse(new TypeReflector('array')->isStringable());
8991
}
9092

0 commit comments

Comments
 (0)