Do not use multiline regexps here

They don't seem to work reliable on hhvm.

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2014-12-05 09:34:19 +01:00
parent e72dffbe4a
commit e7a9575a02

View File

@ -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);
}
/**