瀏覽代碼

tests: hide migration logs

Fabian Peter Hammerle 8 年之前
父節點
當前提交
aab1fe8e63
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 2 0
      tests/SubjectTest.php
  2. 2 0
      tests/TestCase.php

+ 2 - 0
tests/SubjectTest.php

@@ -23,7 +23,9 @@ class SubjectTest extends TestCase
     protected function setUp()
     {
         $this->mockApplication();
+        ob_start();
         (new migrations\CreateSubjectTable)->up();
+        ob_end_clean();
 
         $this->alice = new models\User('alice');
         $this->bob = new models\User('bob');

+ 2 - 0
tests/TestCase.php

@@ -21,7 +21,9 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
             ],
         ]);
         $this->assertEquals([], $app->db->getSchema()->getTableNames());
+        ob_start();
         (new migrations\CreateUserTable)->up();
+        ob_end_clean();
         $this->assertNull($app->user->getIdentity());
         return $app;
     }