summaryrefslogtreecommitdiff
path: root/tests/units/Base.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/Base.php')
-rw-r--r--tests/units/Base.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/units/Base.php b/tests/units/Base.php
index 89d0e2bf..8112c954 100644
--- a/tests/units/Base.php
+++ b/tests/units/Base.php
@@ -84,7 +84,7 @@ abstract class Base extends PHPUnit_Framework_TestCase
$this->container['db']->logQueries = true;
$this->container['logger'] = new Logger;
- $this->container['logger']->setLogger(new File('/dev/null'));
+ $this->container['logger']->setLogger(new File($this->isWindows() ? 'NUL' : '/dev/null'));
$this->container['httpClient'] = new FakeHttpClient;
$this->container['emailClient'] = $this->getMockBuilder('EmailClient')->setMethods(array('send'))->getMock();
@@ -99,4 +99,9 @@ abstract class Base extends PHPUnit_Framework_TestCase
{
$this->container['db']->closeConnection();
}
+
+ public function isWindows()
+ {
+ return substr(PHP_OS, 0, 3) === 'WIN';
+ }
}