Skip to content
Permalink
Browse files

cleanup test files

  • Loading branch information...
dereuromark committed Jun 26, 2015
1 parent a4ef84a commit 7fb05fd94fb9207e2b44bf5c3c4649a720097e9b
Showing with 15 additions and 5 deletions.
  1. +15 −5 tests/TestCase/Shell/I18nShellTest.php
@@ -35,6 +35,8 @@ public function setUp()
parent::setUp();
$this->io = $this->getMock('Cake\Console\ConsoleIo');
$this->shell = new I18nShell($this->io);
$this->localeDir = TMP . 'Locale' . DS;
}
/**
@@ -45,6 +47,14 @@ public function setUp()
public function tearDown()
{
parent::tearDown();
$deDir = $this->localeDir . 'de' . DS;
unlink($this->localeDir . 'default.pot');
unlink($this->localeDir . 'cake.pot');
unlink($deDir . 'default.po');
unlink($deDir . 'cake.po');
}
/**
@@ -54,13 +64,13 @@ public function tearDown()
*/
public function testInit()
{
$localeDir = TMP . 'Locale' . DS;
$deDir = $localeDir . 'de' . DS;
$deDir = $this->localeDir . 'de' . DS;
if (!is_dir($deDir)) {
mkdir($deDir, 0770, true);
}
file_put_contents($localeDir . 'default.pot', 'Testing POT file.');
file_put_contents($localeDir . 'cake.pot', 'Testing POT file.');
file_put_contents($this->localeDir . 'default.pot', 'Testing POT file.');
file_put_contents($this->localeDir . 'cake.pot', 'Testing POT file.');
if (file_exists($deDir . 'default.po')) {
unlink($deDir . 'default.po');
}
@@ -73,7 +83,7 @@ public function testInit()
->will($this->returnValue('de'));
$this->shell->io()->expects($this->at(1))
->method('ask')
->will($this->returnValue($localeDir));
->will($this->returnValue($this->localeDir));
$this->shell->params['verbose'] = true;
$this->shell->init();

0 comments on commit 7fb05fd

Please sign in to comment.
You can’t perform that action at this time.