public function testParseDefaultsPermissionFails() { $this->config->shouldReceive('getDataModel')->once(); $this->validator->shouldReceive('arrayGet')->twice()->andReturn(function ($model) { return false; }); $result = $this->factory->parseDefaults('action', array()); $this->assertEquals($result['has_permission'], false); }