diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-11-29 18:55:56 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-11-29 18:55:56 +0100 |
commit | aaacfae428a354b76a7197452ed94aa77b128ea5 (patch) | |
tree | 56853eaf0497e71fdd13bf9ee1b2ccf810973c4d /tests/test_framework/phpbb_database_test_case.php | |
parent | b453f359ff6dab58b0eaf94548c4e58110fb02ec (diff) | |
parent | 79237b60b6b234e10f14cbcb00691b5e4374fd04 (diff) | |
download | forums-aaacfae428a354b76a7197452ed94aa77b128ea5.tar forums-aaacfae428a354b76a7197452ed94aa77b128ea5.tar.gz forums-aaacfae428a354b76a7197452ed94aa77b128ea5.tar.bz2 forums-aaacfae428a354b76a7197452ed94aa77b128ea5.tar.xz forums-aaacfae428a354b76a7197452ed94aa77b128ea5.zip |
Merge remote-tracking branch 'p/ticket/11174' into develop
* p/ticket/11174:
[ticket/11174] Global $cache is a cache service instance.
[ticket/11174] Delete more copy pasting.
[ticket/11174] Drop needless teardown functions.
[ticket/11174] These tests do not need posts fixtures.
[ticket/11174] Empty fixture for when we don't need any data.
[ticket/11174] Eliminate search wrapper copy pasting.
[ticket/11174] Extract phpbb_search_test_case.
[ticket/11174] Delete copy pasting.
[ticket/11174] Move assertion definition to base class.
[ticket/11174] add unit tests for postgres search backend
[ticket/11174] include utf_tools in postgres search backend
[ticket/11174] negation queries do not return false
[ticket/11174] set config values
[ticket/11174] add test case for native test
[ticket/11174] rename native wrapper class
[ticket/11174] add mysql unit tests
[ticket/11174] removes unnecessary space from word
[ticket/11174] include utf_tools in mysql backend
Diffstat (limited to 'tests/test_framework/phpbb_database_test_case.php')
-rw-r--r-- | tests/test_framework/phpbb_database_test_case.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php index 75a3c0944b..514619687a 100644 --- a/tests/test_framework/phpbb_database_test_case.php +++ b/tests/test_framework/phpbb_database_test_case.php @@ -141,4 +141,20 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test { return $matches[1] . strtoupper($matches[2]) . $matches[3]; } + + public function assert_array_content_equals($one, $two) + { + // http://stackoverflow.com/questions/3838288/phpunit-assert-two-arrays-are-equal-but-order-of-elements-not-important + // but one array_diff is not enough! + if (sizeof(array_diff($one, $two)) || sizeof(array_diff($two, $one))) + { + // get a nice error message + $this->assertEquals($one, $two); + } + else + { + // increase assertion count + $this->assertTrue(true); + } + } } |