From b249614d065edf90147904fc27587580e0db880c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 27 Mar 2015 08:42:10 +0100 Subject: [PATCH] Merge native and multibyte tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Having in all cases dozen of skipped test just makes the results readability worse. So it makes little sense unless we can figure out way to test both implementations. Signed-off-by: Michal Čihař --- test/libraries/stringMb_test.php | 103 --------------------------- test/libraries/stringNative_test.php | 34 --------- test/libraries/string_test.php | 99 +++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 137 deletions(-) delete mode 100644 test/libraries/stringMb_test.php delete mode 100644 test/libraries/stringNative_test.php create mode 100644 test/libraries/string_test.php diff --git a/test/libraries/stringMb_test.php b/test/libraries/stringMb_test.php deleted file mode 100644 index 256994ba89..0000000000 --- a/test/libraries/stringMb_test.php +++ /dev/null @@ -1,103 +0,0 @@ -markTestSkipped( - "Multibyte functions don't exist, skipping test." - ); - } - } - - /** - * Data provider for testStrlen - * - * @return array Test data - */ - public function providerStrlen() - { - return array_merge( - parent::providerStrlen(), - array(array(13, "chaîne testée")) - ); - } - - /** - * Data provider for testSubStr - * - * @return array Test data - */ - public function providerSubstr() - { - return array_merge( - parent::providerSubstr(), - array( - array("rçon", "garçon", 2, 4), - array("de ", "garçon de café", 7, 3) - ) - ); - } - - /** - * Data provider for testSubstrCount - * - * @return array Test data - */ - public function providerSubstrCount() - { - return array_merge( - parent::providerSubstrCount(), - array( - array(2, "garçon de café", "a"), - array(1, "garçon de café attristé", "ç"), - array(2, "garçon de café attristé", "é"), - array(1, "garçon de café attristé", "fé"), - ) - ); - } - - //providerSubstrCountException - - /** - * Data provider for testStrpos - * - * @return array Test data - */ - public function providerStrpos() - { - return array_merge( - parent::providerStrpos(), - array( - array(16, "garçon de café attristé", "t"), - array(13, "garçon de café attristé", "é"), - array(22, "garçon de café attristé", "é", 15), - ) - ); - } - - //providerStrpos - //providerStrrchr - //providerStrtolower -} diff --git a/test/libraries/stringNative_test.php b/test/libraries/stringNative_test.php deleted file mode 100644 index 5ac9de539d..0000000000 --- a/test/libraries/stringNative_test.php +++ /dev/null @@ -1,34 +0,0 @@ -markTestSkipped( - "Multibyte functions exist, can't test standard functions, skipping " - . "test." - ); - } - } -} diff --git a/test/libraries/string_test.php b/test/libraries/string_test.php new file mode 100644 index 0000000000..ce1e47a40d --- /dev/null +++ b/test/libraries/string_test.php @@ -0,0 +1,99 @@ +