Browse Source

fix test implementation for php 5.3
refs issue #3657

Xavier Fornes 10 năm trước cách đây
mục cha
commit
8ba8580a28
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  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')
             ->with(
                 $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)
             );