コード例 #1
0
 /**
  * @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']);
 }
コード例 #2
0
 /**
  * @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');
 }