From 5361de8a8542f3429c97b3b27bd68a6f3840fe0d Mon Sep 17 00:00:00 2001 From: Benoit Colin Date: Thu, 26 Sep 2024 09:22:56 +0200 Subject: [PATCH] feat: phpstan fix --- tests/ProductSearchTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ProductSearchTest.php b/tests/ProductSearchTest.php index b4847f3..3d72deb 100644 --- a/tests/ProductSearchTest.php +++ b/tests/ProductSearchTest.php @@ -25,7 +25,9 @@ public function it_returns_an_empty_laravelcollection_when_no_results_found(): v { $results = OpenFoodFacts::find('no-such-product-exists'); - $this->assertTrue($results->isEmpty()); + // Call to method PHPUnit\Framework\Assert::assertTrue() with bool will always evaluate to false. + // 💡 Because the type is coming from a PHPDoc + $this->assertEquals(true, $results->isEmpty()); } /** @test */