when(function($error, $result) use ($value) { $this->assertNull($error); $this->assertSame($value, $result); }); } }