vendredi 26 juin 2015

how do I set and get a property using mock objects in phpunit?

I created a mock object as follows:

        $mock_kyc = $this->getMockBuilder('Group_KYC_Model')
            ->disableOriginalConstructor()
            ->setMethods(['api_record', '__get'])
            ->getMock();

I want to set the id of the mock_kyc object. How do I do that?

Can I just do $kyc->id = 12345;

Aucun commentaire:

Enregistrer un commentaire