Permalink
Browse files

Updated tests to ensure they start with a fresh file

  • Loading branch information...
1 parent b2f5143 commit 7969439a2e0eca333a75c124a17a11d8e188c7b5 @jbroadway committed Feb 23, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 tests/AnalogTest.php
View
@@ -6,6 +6,8 @@ class AnalogTest extends PHPUnit_Framework_TestCase {
public static $log = '';
function test_default () {
+ @unlink (Analog::handler ());
+
// Check it wrote correctly to temp file
Analog::log ('Foo');
$this->assertEquals (
@@ -15,6 +17,9 @@ function test_default () {
unlink (Analog::handler ());
}
+ /**
+ * @depends test_default
+ */
function test_format () {
// Test changing the format string and write again
Analog::$format = "%s, %s, %d, %s\n";
@@ -26,6 +31,9 @@ function test_format () {
unlink (Analog::handler ());
}
+ /**
+ * @depends test_format
+ */
function test_handler () {
// Test logging using a closure
Analog::handler (function ($msg) {

0 comments on commit 7969439

Please sign in to comment.