'PHPUnit giving me Too few arguments to function Tests\Unit\QuoteTest::test_count_of_quotes_equal_five()
Too few arguments to function Tests\Unit\QuoteTest::test_count_of_quotes_equal_five(), 0 passed in E:\laragon\www\torre-task1\vendor\phpunit\phpunit\src\Framework\TestCase.php on lin e 1545 and exactly 1 expected
public function execute()
{
$quotes=[];
for($i=0;$i<5;$i++)
{
$quote=Http::get('https://api.kanye.rest/');
$quotes[]=$quote['quote'];
}
return $quotes;
}
Testcase
public function test_count_of_quotes_equal_five(QuoteService $quoteService)
{
$quotesArray =$quoteService->execute();
$expectedCount = 5;
$this->assertCount($expectedCount,$quotesArray);
}
Solution 1:[1]
I have found the solution to this question i will upload it incase someone need to know faced the same problem :)

Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kirolos Victor |
