浏览代码

fix test implementation for php 5.3
refs issue #3657

Xavier Fornes 10 年之前
父节点
当前提交
8ba8580a28
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      tests/Composer/Test/IO/ConsoleIOTest.php

+ 3 - 3
tests/Composer/Test/IO/ConsoleIOTest.php

@@ -57,9 +57,9 @@ class ConsoleIOTest extends TestCase
             ->method('write')
             ->method('write')
             ->with(
             ->with(
                 $this->callback(function($messages){
                 $this->callback(function($messages){
-                    $this->assertRegExp("[(.*)/(.*) First line]", $messages[0]);
-                    $this->assertRegExp("[(.*)/(.*) Second line]", $messages[1]);
-                    return true;
+                    $result = preg_match("[(.*)/(.*) First line]", $messages[0]) > 0;
+                    $result &= preg_match("[(.*)/(.*) Second line]", $messages[1]) > 0;
+                    return $result;
                 }),
                 }),
                 $this->equalTo(false)
                 $this->equalTo(false)
             );
             );