Пример #1
0
 /**
  * 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];
 }
Пример #2
0
 public function testMake()
 {
     $ex = SimpleDIException::make();
     $this->assertInstanceOf('SimpleDI\\Exception\\SimpleDIException', $ex);
     $this->assertEquals('Unknown exception', $ex->getMessage());
 }