From fa5c7f6440282891dba1142920157971b90b5ad1 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Mon, 22 Aug 2011 15:35:47 +0100 Subject: [ticket/10240] Added censor_text tests. PHPBB-10240 --- tests/mock/cache.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests/mock/cache.php') diff --git a/tests/mock/cache.php b/tests/mock/cache.php index 11e525ff79..020574b0bb 100644 --- a/tests/mock/cache.php +++ b/tests/mock/cache.php @@ -41,6 +41,28 @@ class phpbb_mock_cache { return $this->data['_bots']; } + + /** + * Obtain list of word censors. We don't need to parse them here, + * that is tested elsewhere. + */ + public function obtain_word_list() + { + return array( + 'match' => array( + '#(? array( + 'replacement1', + 'replacement2', + 'replacement3', + 'replacement4', + ), + ); + } public function set_bots($bots) { -- cgit v1.2.1 From 64827a6623c9a916d41c2ef5bf2c2092a3008722 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 29 Aug 2011 18:43:45 -0400 Subject: [feature/extension-manager] Test creation of new extension finder cache PHPBB3-10323 --- tests/mock/cache.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/mock/cache.php') diff --git a/tests/mock/cache.php b/tests/mock/cache.php index 989180c256..b745123801 100644 --- a/tests/mock/cache.php +++ b/tests/mock/cache.php @@ -59,6 +59,18 @@ class phpbb_mock_cache implements phpbb_cache_driver_interface $test->assertEquals($data, $this->data[$var_name]); } + public function checkAssociativeVar(PHPUnit_Framework_Assert $test, $var_name, $data) + { + $test->assertTrue(isset($this->data[$var_name])); + + foreach ($this->data[$var_name] as &$content) + { + sort($content); + } + + $test->assertEquals($data, $this->data[$var_name]); + } + public function checkVarUnset(PHPUnit_Framework_Assert $test, $var_name) { $test->assertFalse(isset($this->data[$var_name])); -- cgit v1.2.1 From 724f40f0f4fdfc47764a069cc91f045f0c67f4fb Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 13 Oct 2011 21:19:35 +0200 Subject: [feature/extension-manager] extension finder now saves ext it found a file in PHPBB3-10323 --- tests/mock/cache.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/mock/cache.php') diff --git a/tests/mock/cache.php b/tests/mock/cache.php index b745123801..0f174ea449 100644 --- a/tests/mock/cache.php +++ b/tests/mock/cache.php @@ -59,13 +59,16 @@ class phpbb_mock_cache implements phpbb_cache_driver_interface $test->assertEquals($data, $this->data[$var_name]); } - public function checkAssociativeVar(PHPUnit_Framework_Assert $test, $var_name, $data) + public function checkAssociativeVar(PHPUnit_Framework_Assert $test, $var_name, $data, $sort = true) { $test->assertTrue(isset($this->data[$var_name])); - foreach ($this->data[$var_name] as &$content) + if ($sort) { - sort($content); + foreach ($this->data[$var_name] as &$content) + { + sort($content); + } } $test->assertEquals($data, $this->data[$var_name]); -- cgit v1.2.1 From 17991823ea72ef973852fd9d0a9c516703f2137e Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Dec 2011 16:05:02 +0000 Subject: [ticket/9916] Updating License in the header PHPBB3-9916 --- tests/mock/cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/mock/cache.php') diff --git a/tests/mock/cache.php b/tests/mock/cache.php index 020574b0bb..650545c3d6 100644 --- a/tests/mock/cache.php +++ b/tests/mock/cache.php @@ -3,7 +3,7 @@ * * @package testing * @copyright (c) 2008 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ -- cgit v1.2.1 From dcefa16318f6dc1058595a7ba221b75ed6a2504b Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Mon, 6 Aug 2012 16:26:55 -0500 Subject: [ticket/10875] Return $query_id from sql_save Have to return the $query_id from sql_save so that the results can be pulled Updated cache test to do some basic sql cache testing. PHPBB3-10875 --- tests/mock/cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/mock/cache.php') diff --git a/tests/mock/cache.php b/tests/mock/cache.php index c6d08afef0..b64c92ea89 100644 --- a/tests/mock/cache.php +++ b/tests/mock/cache.php @@ -121,7 +121,7 @@ class phpbb_mock_cache implements phpbb_cache_driver_interface public function sql_load($query) { } - public function sql_save($query, &$query_result, $ttl) + public function sql_save($query, $query_result, $ttl) { } public function sql_exists($query_id) -- cgit v1.2.1