Skip to content

Commit

Permalink
Add test on CliRouter to check cleanup (#228)
Browse files Browse the repository at this point in the history
* add test on std-in cleanup for CliRouter

* correct test method name: s/CliRouter::testStdinCleanup/CliRouter::testStdInCleanup/
  • Loading branch information
sosuke-ito authored and koriym committed Mar 1, 2017
1 parent a71fa2b commit 1d2f892
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/Provide/Router/CliRouterTest.php
Expand Up @@ -100,4 +100,14 @@ public function testError()
];
$this->router->match($globals, []);
}

public function testStdInCleanup()
{
file_put_contents($this->stdInFile, '');
$exists = file_exists($this->stdInFile);
$this->assertTrue($exists);
unset($this->router);
$exists = file_exists($this->stdInFile);
$this->assertFalse($exists);
}
}

0 comments on commit 1d2f892

Please sign in to comment.