aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/config/db_text.php12
-rw-r--r--tests/config/db_text_test.php22
2 files changed, 17 insertions, 17 deletions
diff --git a/phpBB/includes/config/db_text.php b/phpBB/includes/config/db_text.php
index 6449a2e02b..b365cb5c77 100644
--- a/phpBB/includes/config/db_text.php
+++ b/phpBB/includes/config/db_text.php
@@ -56,7 +56,7 @@ class phpbb_config_db_text
*/
public function set($key, $value)
{
- $this->set_all(array($key => $value));
+ $this->set_array(array($key => $value));
}
/**
@@ -69,7 +69,7 @@ class phpbb_config_db_text
*/
public function get($key)
{
- $map = $this->get_all(array($key));
+ $map = $this->get_array(array($key));
return isset($map[$key]) ? $map[$key] : null;
}
@@ -83,7 +83,7 @@ class phpbb_config_db_text
*/
public function delete($key)
{
- $this->delete_all(array($key));
+ $this->delete_array(array($key));
}
/**
@@ -95,7 +95,7 @@ class phpbb_config_db_text
*
* @return null
*/
- public function set_all(array $map)
+ public function set_array(array $map)
{
$this->db->sql_transaction('begin');
@@ -129,7 +129,7 @@ class phpbb_config_db_text
*
* @return array Map from configuration names to values
*/
- public function get_all(array $keys)
+ public function get_array(array $keys)
{
$sql = 'SELECT *
FROM ' . $this->table . '
@@ -153,7 +153,7 @@ class phpbb_config_db_text
*
* @return null
*/
- public function delete_all(array $keys)
+ public function delete_array(array $keys)
{
$sql = 'DELETE
FROM ' . $this->table . '
diff --git a/tests/config/db_text_test.php b/tests/config/db_text_test.php
index 03e581fead..4818bba8c9 100644
--- a/tests/config/db_text_test.php
+++ b/tests/config/db_text_test.php
@@ -64,48 +64,48 @@ class phpbb_config_db_text_test extends phpbb_database_test_case
$this->assertSame('string-de-ding', $this->config_text->get('meh'));
}
- public function test_get_all_empty()
+ public function test_get_array_empty()
{
- $this->assertEmpty($this->config_text->get_all(array('key1', 'key2')));
+ $this->assertEmpty($this->config_text->get_array(array('key1', 'key2')));
}
- public function test_get_all_subset()
+ public function test_get_array_subset()
{
$expected = array(
'bar' => '42',
'foo' => '23',
);
- $actual = $this->config_text->get_all(array_keys($expected));
+ $actual = $this->config_text->get_array(array_keys($expected));
ksort($actual);
$this->assertSame($expected, $actual);
}
- public function test_set_all_get_all_subset()
+ public function test_set_array_get_array_subset()
{
- $set_all_param = array(
+ $set_array_param = array(
// New entry
'baby' => 'phpBB',
// Entry update
'bar' => '64',
);
- $this->config_text->set_all($set_all_param);
+ $this->config_text->set_array($set_array_param);
- $expected = array_merge($set_all_param, array(
+ $expected = array_merge($set_array_param, array(
'foo' => '23',
));
- $actual = $this->config_text->get_all(array_keys($expected));
+ $actual = $this->config_text->get_array(array_keys($expected));
ksort($actual);
$this->assertSame($expected, $actual);
}
- public function test_delete_all_get_remaining()
+ public function test_delete_array_get_remaining()
{
- $this->config_text->delete_all(array('foo', 'bar'));
+ $this->config_text->delete_array(array('foo', 'bar'));
$this->assertNull($this->config_text->get('bar'));
$this->assertNull($this->config_text->get('foo'));