소스 검색

Merge pull request #6435 from remicollet/issue-deps

Issue deps
Jordi Boggiano 7 년 전
부모
커밋
771ea8bffe
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 1
      tests/Composer/Test/IO/ConsoleIOTest.php
  2. 2 1
      tests/Composer/Test/Json/ComposerSchemaTest.php

+ 4 - 1
tests/Composer/Test/IO/ConsoleIOTest.php

@@ -218,8 +218,11 @@ class ConsoleIOTest extends TestCase
             ->will($this->returnValue($helperMock))
         ;
 
+        $validator = function ($value) {
+             return true;
+        };
         $consoleIO = new ConsoleIO($inputMock, $outputMock, $setMock);
-        $consoleIO->askAndValidate('Why?', 'validator', 10, 'default');
+        $consoleIO->askAndValidate('Why?', $validator, 10, 'default');
     }
 
     public function testSelect()

+ 2 - 1
tests/Composer/Test/Json/ComposerSchemaTest.php

@@ -101,9 +101,10 @@ class ComposerSchemaTest extends \PHPUnit_Framework_TestCase
         if (!$validator->isValid()) {
             $errors = $validator->getErrors();
 
-            // remove justinrainbow/json-schema 3.0 props so it works with all versions
+            // remove justinrainbow/json-schema 3.0/5.2 props so it works with all versions
             foreach ($errors as &$err) {
                 unset($err['pointer']);
+                unset($err['context']);
             }
 
             return $errors;