/** * @group disconnected * @expectedException \InvalidArgumentException * @expecteExceptionMessage Unknown connection scheme: 'test'. */ public function testDefineAndUndefineConnection() { list(, $connectionClass) = $this->getMockConnectionClass(); $factory = new Factory(); $factory->define('test', $connectionClass); $this->assertInstanceOf($connectionClass, $factory->create('test://127.0.0.1')); $factory->undefine('test'); $factory->create('test://127.0.0.1'); }