Ejemplo n.º 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];
 }
Ejemplo n.º 2
0
 public function testMake()
 {
     $ex = SimpleDIException::make();
     $this->assertInstanceOf('SimpleDI\\Exception\\SimpleDIException', $ex);
     $this->assertEquals('Unknown exception', $ex->getMessage());
 }