I am trying to create a layout to suit the type type with this code (Mockery):
return \Mockery::mock('\Contracts\Helpers\iFileSystemWrapper');
or this (PHPUnit):
return $this->getMock('\Contracts\Helpers\iFileSystemWrapper');
But the returned layout is called Mockery\Mock Object
or Mock_iFileSystemWrapper_a5f91049
. How can I enter the type of check, if this is not an instance of what I need with any card at all?
Why is the mock framework trying to load a real class? If I needed a real class, I would include a real class.
This problem has slowed me down so many times when I write tests that I’m just going to throw in a type, hinting at a window, and instead check class names or just use production objects because mana is a pain to use.
source share