| @@ 43-56 (lines=14) @@ | ||
| 40 | ); |
|
| 41 | } |
|
| 42 | ||
| 43 | public function testValidConnection() |
|
| 44 | { |
|
| 45 | $this->assertTrue( |
|
| 46 | $this->connection->connect( |
|
| 47 | [ |
|
| 48 | 'common_name' => 'foo_bar', |
|
| 49 | 'POOL_ID' => 'internet', |
|
| 50 | 'time_unix' => '12345678', |
|
| 51 | 'ifconfig_pool_remote_ip' => '10.0.42.0', |
|
| 52 | 'ifconfig_pool_remote_ip6' => 'fd00:4242:4242:4242::', |
|
| 53 | ] |
|
| 54 | ) |
|
| 55 | ); |
|
| 56 | } |
|
| 57 | ||
| 58 | public function testDisabledUser() |
|
| 59 | { |
|
| @@ 58-71 (lines=14) @@ | ||
| 55 | ); |
|
| 56 | } |
|
| 57 | ||
| 58 | public function testDisabledUser() |
|
| 59 | { |
|
| 60 | $this->assertFalse( |
|
| 61 | $this->connection->connect( |
|
| 62 | [ |
|
| 63 | 'common_name' => 'bar_bar', |
|
| 64 | 'POOL_ID' => 'internet', |
|
| 65 | 'time_unix' => '12345678', |
|
| 66 | 'ifconfig_pool_remote_ip' => '10.0.42.0', |
|
| 67 | 'ifconfig_pool_remote_ip6' => 'fd00:4242:4242:4242::', |
|
| 68 | ] |
|
| 69 | ) |
|
| 70 | ); |
|
| 71 | } |
|
| 72 | ||
| 73 | public function testDisabledCommonName() |
|
| 74 | { |
|
| @@ 73-86 (lines=14) @@ | ||
| 70 | ); |
|
| 71 | } |
|
| 72 | ||
| 73 | public function testDisabledCommonName() |
|
| 74 | { |
|
| 75 | $this->assertFalse( |
|
| 76 | $this->connection->connect( |
|
| 77 | [ |
|
| 78 | 'common_name' => 'foo_baz', |
|
| 79 | 'POOL_ID' => 'internet', |
|
| 80 | 'time_unix' => '12345678', |
|
| 81 | 'ifconfig_pool_remote_ip' => '10.0.42.0', |
|
| 82 | 'ifconfig_pool_remote_ip6' => 'fd00:4242:4242:4242::', |
|
| 83 | ] |
|
| 84 | ) |
|
| 85 | ); |
|
| 86 | } |
|
| 87 | ||
| 88 | public function testAclValid() |
|
| 89 | { |
|
| @@ 88-101 (lines=14) @@ | ||
| 85 | ); |
|
| 86 | } |
|
| 87 | ||
| 88 | public function testAclValid() |
|
| 89 | { |
|
| 90 | $this->assertTrue( |
|
| 91 | $this->connection->connect( |
|
| 92 | [ |
|
| 93 | 'common_name' => 'foo_bar', |
|
| 94 | 'POOL_ID' => 'acl', |
|
| 95 | 'time_unix' => '12345678', |
|
| 96 | 'ifconfig_pool_remote_ip' => '10.0.42.0', |
|
| 97 | 'ifconfig_pool_remote_ip6' => 'fd00:4242:4242:4242::', |
|
| 98 | ] |
|
| 99 | ) |
|
| 100 | ); |
|
| 101 | } |
|
| 102 | ||
| 103 | public function testAclInvalid() |
|
| 104 | { |
|
| @@ 103-116 (lines=14) @@ | ||
| 100 | ); |
|
| 101 | } |
|
| 102 | ||
| 103 | public function testAclInvalid() |
|
| 104 | { |
|
| 105 | $this->assertFalse( |
|
| 106 | $this->connection->connect( |
|
| 107 | [ |
|
| 108 | 'common_name' => 'foo_bar', |
|
| 109 | 'POOL_ID' => 'acl2', |
|
| 110 | 'time_unix' => '12345678', |
|
| 111 | 'ifconfig_pool_remote_ip' => '10.0.42.0', |
|
| 112 | 'ifconfig_pool_remote_ip6' => 'fd00:4242:4242:4242::', |
|
| 113 | ] |
|
| 114 | ) |
|
| 115 | ); |
|
| 116 | } |
|
| 117 | ||
| 118 | public function testDisconnect() |
|
| 119 | { |
|