elliotchance / concise

✅ Concise is test framework for using plain English and minimal code, built on PHPUnit.
MIT License
45 stars 3 forks source link

Allow mocking for chains #181

Open elliotchance opened 10 years ago

elliotchance commented 10 years ago
public function doSomething(MyClass $obj)
{
    return $obj->getSomething()->thenSomethingElse();
}
public function testChain()
{
    $mock = $this->mock('MyClass')
                 ->stub(['getSomething->thenSomethingElse' => 'foobar'])
                 ->done();
}