public function testLoadEntity() { $this->getController(); $this->paramsPlugin->expects($this->once())->method('fromRoute')->with('entity')->will($this->returnValue('user')); $this->entityService->expects($this->once())->method('getEntity')->with('user'); $this->object->loadEntity(); }
/** * @param $type * @param $key * @param $value */ protected function mockParam($type, $key, $value) { $this->params->expects($this->any())->method('from' . ucfirst($type))->with($key)->will($this->returnValue($value)); }