Skip to content

Commit

Permalink
Fix leaky file descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 14, 2024
1 parent 2f904f3 commit eda65ba
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/TestCase/Migration/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace Migrations\Test\TestCase\Migration;

use Cake\Console\ConsoleIo;
use Cake\Console\TestSuite\StubConsoleInput;
use Cake\Console\TestSuite\StubConsoleOutput;
use Cake\Datasource\ConnectionManager;
use DateTime;
Expand Down Expand Up @@ -31,10 +32,15 @@ class ManagerTest extends TestCase
protected $io;

/**
* @var \Cake\Console\TestSuite\StubConsoleOutput $io
* @var \Cake\Console\TestSuite\StubConsoleOutput $out
*/
protected $out;

/**
* @var \Cake\Console\TestSuite\StubConsoleInput $in
*/
protected $in;

/**
* @var Manager
*/
Expand All @@ -46,8 +52,9 @@ protected function setUp(): void

$this->out = new StubConsoleOutput();
$this->out->setOutputAs(StubConsoleOutput::PLAIN);
$this->in = new StubConsoleInput([]);

$this->io = new ConsoleIo($this->out, $this->out);
$this->io = new ConsoleIo($this->out, $this->out, $this->in);
$this->manager = new Manager($this->config, $this->io);
}

Expand Down

0 comments on commit eda65ba

Please sign in to comment.