jeudi 7 décembre 2017

PHPUnit: Class not found

I use PHPUnit 5 in my class compte, I develop this code in a method

   /**
     * @covers Compte::method()
     * @dataProvider entityToJsonData
     */
    public function testMethod($data, $expected)
    {
        $this->object = $this->getMockBuilder('Compte')
            ->getMock();

        $actualReponse = $this->object->method($data);
        $this->assertEquals($expected, $actualReponse);

    }

PHP display this error message:

Fatal error: Class 'Compte' not found in CompteTest.php

Can you help me ?

Aucun commentaire:

Enregistrer un commentaire