I have this class I want to test in phpspec:
class Something
{
protected $property;
public function __construct($someId)
{
$this->property = Model::find($someId);
}
}
Model::find() returns a Model instance.
And I don't want phpspec to use the db etc. I tried
class SomethingSpec
{
public function let(Model $model)
{
$this->property = $model;
}
it_is_initializable...
But that doesn't work.
Anybody?