Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Feb 8, 2024
1 parent 02a4be3 commit 6937ba2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/TypeCaster/NullTypeCasterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,14 @@ public function testBase(bool $success, NullTypeCaster $typeCaster, mixed $value
$this->assertNull($result->getValue());
}
}

public function testConstructor(): void
{
$typeCaster = new NullTypeCaster();
$context = TestHelper::createTypeCastContext(fn($a) => null);

$result = $typeCaster->cast('hello', $context);

$this->assertSame(false, $result->isResolved());
}
}

0 comments on commit 6937ba2

Please sign in to comment.