Created
January 5, 2016 21:07
-
-
Save Grummfy/04b2f9209583abfcd289 to your computer and use it in GitHub Desktop.
atoum demo newMockInstance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Burps { | |
interface TotoInterface | |
{ | |
public function toto(); | |
} | |
class Toto implements TotoInterface | |
{ | |
public function toto() | |
{ | |
return 'tutu'; | |
} | |
} | |
} | |
namespace Burps\test\unit | |
{ | |
class Toto extends \atoum\test | |
{ | |
public function testToto() | |
{ | |
$this->newTestedInstance; | |
$this->assert()->object($this->testedInstance)->isInstanceOf(\Burps\TotoInterface::class); | |
$this->object($this->newMockInstance(\Burps\TotoInterface::class))->isInstanceOf(\Burps\TotoInterface::class); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment