From e7a9575a02238c43008a55a13abcf2ce3d3c3cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 5 Dec 2014 09:34:19 +0100 Subject: [PATCH] Do not use multiline regexps here MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They don't seem to work reliable on hhvm. Signed-off-by: Michal Čihař --- test/libraries/PMA_operations_test.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/test/libraries/PMA_operations_test.php b/test/libraries/PMA_operations_test.php index 0f49a5568f..b8e6bf07f4 100644 --- a/test/libraries/PMA_operations_test.php +++ b/test/libraries/PMA_operations_test.php @@ -95,12 +95,11 @@ class PMA_Operations_Test extends PHPUnit_Framework_TestCase */ public function testGetHtmlForCopyDatabase() { - $_REQUEST['db_collation'] = 'db1'; - $this->assertRegExp( - '/.*db_operations.php(.|[\n])*db_copy([\n]|.)*Copy database to.*/m', - PMA_getHtmlForCopyDatabase("pma") - ); + $html = PMA_getHtmlForCopyDatabase("pma"); + $this->assertRegExp('/.*db_operations.php.*/', $html); + $this->assertRegExp('/.*db_copy.*/', $html); + $this->assertRegExp('/.*Copy database to.*/', $html); } /** @@ -209,14 +208,13 @@ class PMA_Operations_Test extends PHPUnit_Framework_TestCase */ public function testGetHtmlForPartitionMaintenance() { - - $this->assertRegExp( - '/.*action="tbl_operations.php"(.|[\n])*ANALYZE([\n]|.)*REBUILD([\n]|.)*/m', - PMA_getHtmlForPartitionMaintenance( - array("partition1", "partion2"), - array("param1" => 'foo', "param2" => 'bar') - ) + $html = PMA_getHtmlForPartitionMaintenance( + array("partition1", "partion2"), + array("param1" => 'foo', "param2" => 'bar') ); + $this->assertRegExp('/.*action="tbl_operations.php".*/', $html); + $this->assertRegExp('/.*ANALYZE.*/', $html); + $this->assertRegExp('/.*REBUILD.*/', $html); } /**