Esempio n. 1
0
 public function testAddStaticRouter()
 {
     $manager = MtRouter::getRouter(MtRouter::StaticMTRoute, self::$telnetConnector);
     $manager->setId(101);
     $manager->attributes['rate'] = '100.0';
     $manager->setConnector('test_new_one');
     $manager->setFilters(['test_new_u_f']);
     $this->assertTrue($manager->add(), strtr('Can`t insert new MtRouter because of :error', [':error' => json_encode($manager->errors)]));
 }
Esempio n. 2
0
 public function __construct(TelnetConnector $connector)
 {
     parent::__construct($connector);
     $this->attributes['type'] = self::StaticMTRoute;
 }