/** * Returns the mapped container method name. * * @param string $getter Getter function name * @return string * @throws SimpleDIException */ private function dispatchGetter($getter) { if (!isset($this->getterList[$getter])) { throw SimpleDIException::make('Undefined dependency "' . $getter . '"!'); } return $this->getterList[$getter]; }
public function testMake() { $ex = SimpleDIException::make(); $this->assertInstanceOf('SimpleDI\\Exception\\SimpleDIException', $ex); $this->assertEquals('Unknown exception', $ex->getMessage()); }