/** * @expectedException \PBergman\Bundle\BeanstalkBundle\Exception\ConnectionException * @expectedExceptionMessage No connection defined by name: "default" */ public function testRemoveConnection() { $manager = new Manager(); $manager->addConfiguration('default', new Configuration('127.0.0.100', 123456, 2, true)); unset($manager['default']); unset($manager['default']); }
/** * @expectedException \PBergman\Bundle\BeanstalkBundle\Exception\ConnectionException * @expectedExceptionMessage No connection defined by name: */ public function testNotDefined() { $manager = new Manager(); $manager->addConfiguration('a', new Configuration(null)); $manager->getConfiguration('b'); }