public function testApiCreate_ThrowsException_ForNonExistingKey() { $test = $this->getTest(); $test->setExpectedException(IllegalCallException::class); $factory = $this->createFactory(); $factory->create('NonExisting'); }