mardi 8 décembre 2020

Failed asserting that 1 matches expected 6

i get this test, and i need to write code that pass.

But only what i can get is : "Failed asserting that 1 matches expected 6 " if i return 6 i get " Too few arguments to function on line 18 and exactly 3 expected "

This is test :

    public function powerTest()
{
    $calculator = new Calculator();

    $this->assertEquals(6, $calculator->power(1,2,3));
    $this->assertEquals(0, $calculator->power());
}

That is my code :

    public function power(int $int, int $int1, int $int2)
{
    return 1;
}

Aucun commentaire:

Enregistrer un commentaire