RE: Error: Argument 1 passed to screenFake::__construct() must be aninstance of databaseInterfaseFake, instance ofMock_databaseInterfaceFake_b36397fd

From: Date: Mon, 24 Aug 2015 13:15:19 +0000
Subject: RE: Error: Argument 1 passed to screenFake::__construct() must be aninstance of databaseInterfaseFake, instance ofMock_databaseInterfaceFake_b36397fd
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-325070@lists.php.net to get a copy of this message
This is embarrassing, thank you. ________________________________________ From: Christoph Becker [cmbecker69@gmx.de] Sent: Saturday, August 22, 2015 9:06 PM To: Ramiro Barrantes; php-general@lists.php.net Subject: Re: Error: Argument 1 passed to screenFake::__construct() must be aninstance of databaseInterfaseFake, instance ofMock_databaseInterfaceFake_b36397fd On 22.08.2015 at 22:34, Ramiro Barrantes wrote: > I am trying to write a unit test for a dependency injection situation and I have a reproducible > example at the end. I am getting this error: > > 1) testFake::test_fake > Argument 1 passed to screenFake::__construct() must be an instance of databaseInterfaseFake, > instance of Mock_databaseInterfaceFake_b36397fd given, called in fakeTest.php on line 25 and de... It seems you have a typo there: databaseInterfaseFake should probably be databaseInterfaceFake. -- Christoph M. Becker

« previous php.general (#325070) next »