Skip to content

Instantly share code, notes, and snippets.

@Grummfy
Created January 5, 2016 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Grummfy/04b2f9209583abfcd289 to your computer and use it in GitHub Desktop.
Save Grummfy/04b2f9209583abfcd289 to your computer and use it in GitHub Desktop.
atoum demo newMockInstance
<?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