/** * @expectedException \Exception * @expectedExceptionMessage Invalid class ID */ public function testCreatingInvalidClassThrows() { BaseFactory::factory("This\\Class\\Does\\Not\\Exist"); }