From b63ddb6b41fae71f8a753ec99b6a6b74e58d53cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 24 Feb 2014 11:59:41 +0100 Subject: [PATCH] Test encoded binary output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise PHP sometimes refuses to match binary content using PCRE. Signed-off-by: Michal Čihař --- test/classes/plugin/export/PMA_ExportOds_test.php | 3 ++- test/classes/plugin/export/PMA_ExportOdt_test.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/classes/plugin/export/PMA_ExportOds_test.php b/test/classes/plugin/export/PMA_ExportOds_test.php index 57aceb551f..b8d02f2082 100644 --- a/test/classes/plugin/export/PMA_ExportOds_test.php +++ b/test/classes/plugin/export/PMA_ExportOds_test.php @@ -192,7 +192,8 @@ class PMA_ExportOds_Test extends PHPUnit_Framework_TestCase { $GLOBALS['ods_buffer'] = 'header'; - $this->expectOutputRegex('/^PK.*content.xml/'); + $this->expectOutputRegex('/^504b.*636f6e74656e742e786d6c2f/'); + $this->setOutputCallback('bin2hex'); $this->assertTrue( $this->object->exportFooter() diff --git a/test/classes/plugin/export/PMA_ExportOdt_test.php b/test/classes/plugin/export/PMA_ExportOdt_test.php index ef8d89e706..46f589fa15 100644 --- a/test/classes/plugin/export/PMA_ExportOdt_test.php +++ b/test/classes/plugin/export/PMA_ExportOdt_test.php @@ -333,7 +333,8 @@ class PMA_ExportOdt_Test extends PHPUnit_Framework_TestCase { $GLOBALS['odt_buffer'] = 'header'; - $this->expectOutputRegex('/^PK.*content.xml/'); + $this->expectOutputRegex('/^504b.*636f6e74656e742e786d6c2f/'); + $this->setOutputCallback('bin2hex'); $this->assertTrue( $this->object->exportFooter()