diff --git a/.gitignore b/.gitignore index 8c2410bfcace..0d7c79ac2321 100644 --- a/.gitignore +++ b/.gitignore @@ -67,8 +67,6 @@ writable/uploads/* writable/debugbar/* -application/Database/Migrations/2* - php_errors.log #------------------------- diff --git a/tests/system/Commands/SessionsCommandsTest.php b/tests/system/Commands/SessionsCommandsTest.php index d89cf87f41b2..95c03fd5ba94 100644 --- a/tests/system/Commands/SessionsCommandsTest.php +++ b/tests/system/Commands/SessionsCommandsTest.php @@ -16,6 +16,7 @@ class SessionsCommandsTest extends \CIUnitTestCase protected $response; protected $logger; protected $runner; + private $result; public function setUp() { @@ -51,6 +52,14 @@ public function setUp() public function tearDown() { stream_filter_remove($this->stream_filter); + + $result = remove_invisible_characters($this->result); + $result = str_replace('[0;32m', '', $result); + $result = str_replace('[0m', '', $result); + $file = trim(substr($result, 14)); + $file = str_replace('APPPATH', APPPATH, $file); + + unlink($file); } public function testCreateMigrationCommand() @@ -64,6 +73,8 @@ public function testCreateMigrationCommand() $this->assertContains('Created file:', $result); $this->assertContains('APPPATH/Database/Migrations/', $result); $this->assertContains('_create_ci_sessions_table.php', $result); + + $this->result = $result; } public function testOverriddenCreateMigrationCommand() @@ -84,6 +95,8 @@ public function testOverriddenCreateMigrationCommand() $this->assertContains('Created file:', $result); $this->assertContains('APPPATH/Database/Migrations/', $result); $this->assertContains('_create_mygoodies_table.php', $result); + + $this->result = $result; } }