Guest User

Untitled

a guest
Aug 28th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. if ($entity instanceof EditorAttributes) {
  2. // ....
  3. }
  4.  
  5. class FooTest extends PHPUnitFrameworkTestCase
  6. {
  7. public function testFoo()
  8. {
  9. $mock = $this->getMock('EditorAttributes');
  10. $this->assertTrue($mock instanceof EditorAttributes);
  11. }
  12. }
  13.  
  14. class FooTest extends PHPUnitFrameworkTestCase
  15. {
  16. public function testFoo()
  17. {
  18. $mock = $this->getMock(['EditorAttributes', 'ReaderAttributes']);
  19. $this->assertTrue($mock instanceof EditorAttributes);
  20. $this->assertTrue($mock instanceof ReaderAttributes);
  21. }
  22. }
Add Comment
Please, Sign In to add comment