diff options
Diffstat (limited to 'tests/config/config_test.php')
-rw-r--r-- | tests/config/config_test.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/config/config_test.php b/tests/config/config_test.php index 5845cc4590..5373fcef5f 100644 --- a/tests/config/config_test.php +++ b/tests/config/config_test.php @@ -11,7 +11,7 @@ class phpbb_config_test extends phpbb_test_case { public function test_offset_exists() { - $config = new phpbb_config(array('foo' => 'bar')); + $config = new \phpbb\config\config(array('foo' => 'bar')); $this->assertTrue(isset($config['foo'])); $this->assertFalse(isset($config['foobar'])); @@ -19,19 +19,19 @@ class phpbb_config_test extends phpbb_test_case public function test_offset_get() { - $config = new phpbb_config(array('foo' => 'bar')); + $config = new \phpbb\config\config(array('foo' => 'bar')); $this->assertEquals('bar', $config['foo']); } public function test_offset_get_missing() { - $config = new phpbb_config(array()); + $config = new \phpbb\config\config(array()); $this->assertEquals('', $config['foo']); } public function test_offset_set() { - $config = new phpbb_config(array()); + $config = new \phpbb\config\config(array()); $config['foo'] = 'x'; $this->assertEquals('x', $config['foo']); } @@ -39,20 +39,20 @@ class phpbb_config_test extends phpbb_test_case public function test_offset_unset_fails() { $this->setExpectedTriggerError(E_USER_ERROR); - $config = new phpbb_config(array('foo' => 'x')); + $config = new \phpbb\config\config(array('foo' => 'x')); unset($config['foo']); } public function test_count() { - $config = new phpbb_config(array('foo' => 'bar')); + $config = new \phpbb\config\config(array('foo' => 'bar')); $this->assertEquals(1, count($config)); } public function test_iterate() { $vars = array('foo' => '23', 'bar' => '42'); - $config = new phpbb_config($vars); + $config = new \phpbb\config\config($vars); $count = 0; foreach ($config as $key => $value) @@ -68,42 +68,42 @@ class phpbb_config_test extends phpbb_test_case public function test_set_overwrite() { - $config = new phpbb_config(array('foo' => 'x')); + $config = new \phpbb\config\config(array('foo' => 'x')); $config->set('foo', 'bar'); $this->assertEquals('bar', $config['foo']); } public function test_set_new() { - $config = new phpbb_config(array()); + $config = new \phpbb\config\config(array()); $config->set('foo', 'bar'); $this->assertEquals('bar', $config['foo']); } public function test_set_atomic_overwrite() { - $config = new phpbb_config(array('foo' => 'bar')); + $config = new \phpbb\config\config(array('foo' => 'bar')); $this->assertTrue($config->set_atomic('foo', 'bar', '23')); $this->assertEquals('23', $config['foo']); } public function test_set_atomic_new() { - $config = new phpbb_config(array()); + $config = new \phpbb\config\config(array()); $this->assertTrue($config->set_atomic('foo', false, '23')); $this->assertEquals('23', $config['foo']); } public function test_set_atomic_failure() { - $config = new phpbb_config(array('foo' => 'bar')); + $config = new \phpbb\config\config(array('foo' => 'bar')); $this->assertFalse($config->set_atomic('foo', 'wrong', '23')); $this->assertEquals('bar', $config['foo']); } public function test_increment() { - $config = new phpbb_config(array('foo' => '23')); + $config = new \phpbb\config\config(array('foo' => '23')); $config->increment('foo', 3); $this->assertEquals(26, $config['foo']); $config->increment('foo', 1); @@ -112,7 +112,7 @@ class phpbb_config_test extends phpbb_test_case public function test_delete() { - $config = new phpbb_config(array('foo' => 'bar')); + $config = new \phpbb\config\config(array('foo' => 'bar')); $config->delete('foo'); $this->assertFalse(isset($config['foo'])); |