logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject [29/43] Fixed code formatting to conform to PSR-2
Date Thu, 28 Nov 2013 16:03:59 GMT
http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Helpers/UtilsTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Helpers/UtilsTest.php b/tests/src/Helpers/UtilsTest.php
index 38ac597..b9f816b 100644
--- a/tests/src/Helpers/UtilsTest.php
+++ b/tests/src/Helpers/UtilsTest.php
@@ -27,63 +27,65 @@ use Apache\Log4php\Helpers\Utils;
 /**
  * @group helpers
  */
-class LoggerUtilsTest extends \PHPUnit_Framework_TestCase {
+class LoggerUtilsTest extends \PHPUnit_Framework_TestCase
+{
+    public function testShorten()
+    {
+        $name = 'org\\apache\\logging\\log4php\\Foo';
 
-	public function testShorten() {
-		$name = 'org\\apache\\logging\\log4php\\Foo';
+        $actual = Utils::shortenClassName($name, null);
+        self::assertSame($name, $actual);
 
-		$actual = Utils::shortenClassName($name, null);
-		self::assertSame($name, $actual);
+        $actual = Utils::shortenClassName($name, 0);
+        self::assertSame('Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 0);
-		self::assertSame('Foo', $actual);
+        $actual = Utils::shortenClassName($name, 5);
+        self::assertSame('o\\a\\l\\l\\Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 5);
-		self::assertSame('o\\a\\l\\l\\Foo', $actual);
+        $actual = Utils::shortenClassName($name, 16);
+        self::assertSame('o\\a\\l\\l\\Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 16);
-		self::assertSame('o\\a\\l\\l\\Foo', $actual);
+        $actual = Utils::shortenClassName($name, 17);
+        self::assertSame('o\\a\\l\\log4php\\Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 17);
-		self::assertSame('o\\a\\l\\log4php\\Foo', $actual);
+        $actual = Utils::shortenClassName($name, 25);
+        self::assertSame('o\\a\\logging\\log4php\\Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 25);
-		self::assertSame('o\\a\\logging\\log4php\\Foo', $actual);
+        $actual = Utils::shortenClassName($name, 28);
+        self::assertSame('o\\apache\\logging\\log4php\\Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 28);
-		self::assertSame('o\\apache\\logging\\log4php\\Foo', $actual);
+        $actual = Utils::shortenClassName($name, 30);
+        self::assertSame('org\\apache\\logging\\log4php\\Foo', $actual);
+    }
 
-		$actual = Utils::shortenClassName($name, 30);
-		self::assertSame('org\\apache\\logging\\log4php\\Foo', $actual);
-	}
+    /** Dot separated notation must be supported for legacy reasons. */
+    public function testShortenWithDots()
+    {
+        $name = 'org.apache.logging.log4php.Foo';
 
-	/** Dot separated notation must be supported for legacy reasons. */
-	public function testShortenWithDots() {
-		$name = 'org.apache.logging.log4php.Foo';
+        $actual = Utils::shortenClassName($name, null);
+        self::assertSame($name, $actual);
 
-		$actual = Utils::shortenClassName($name, null);
-		self::assertSame($name, $actual);
+        $actual = Utils::shortenClassName($name, 0);
+        self::assertSame('Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 0);
-		self::assertSame('Foo', $actual);
+        $actual = Utils::shortenClassName($name, 5);
+        self::assertSame('o\a\l\l\Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 5);
-		self::assertSame('o\a\l\l\Foo', $actual);
+        $actual = Utils::shortenClassName($name, 16);
+        self::assertSame('o\a\l\l\Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 16);
-		self::assertSame('o\a\l\l\Foo', $actual);
+        $actual = Utils::shortenClassName($name, 17);
+        self::assertSame('o\a\l\log4php\Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 17);
-		self::assertSame('o\a\l\log4php\Foo', $actual);
+        $actual = Utils::shortenClassName($name, 25);
+        self::assertSame('o\a\logging\log4php\Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 25);
-		self::assertSame('o\a\logging\log4php\Foo', $actual);
+        $actual = Utils::shortenClassName($name, 28);
+        self::assertSame('o\apache\logging\log4php\Foo', $actual);
 
-		$actual = Utils::shortenClassName($name, 28);
-		self::assertSame('o\apache\logging\log4php\Foo', $actual);
+        $actual = Utils::shortenClassName($name, 30);
+        self::assertSame('org\apache\logging\log4php\Foo', $actual);
+    }
 
-		$actual = Utils::shortenClassName($name, 30);
-		self::assertSame('org\apache\logging\log4php\Foo', $actual);
-	}
-
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/HierarchyTest.php
----------------------------------------------------------------------
diff --git a/tests/src/HierarchyTest.php b/tests/src/HierarchyTest.php
index d9f5b49..183c75a 100644
--- a/tests/src/HierarchyTest.php
+++ b/tests/src/HierarchyTest.php
@@ -30,76 +30,81 @@ use Apache\Log4php\RootLogger;
 /**
  * @group main
  */
-class HierarchyTest extends \PHPUnit_Framework_TestCase {
-
-	private $hierarchy;
-
-	protected function setUp() {
-		$this->hierarchy = new Hierarchy(new RootLogger());
-	}
-
-	public function testResetConfiguration() {
-		$root = $this->hierarchy->getRootLogger();
-		$appender = new ConsoleAppender('A1');
-		$root->addAppender($appender);
-
-		$logger = $this->hierarchy->getLogger('test');
-		self::assertEquals(1, count($this->hierarchy->getCurrentLoggers()));
-
-		$this->hierarchy->resetConfiguration();
-		self::assertEquals(Level::getLevelDebug(), $root->getLevel());
-		self::assertEquals(Level::getLevelAll(), $this->hierarchy->getThreshold());
-		self::assertEquals(1, count($this->hierarchy->getCurrentLoggers()));
-
-		foreach($this->hierarchy->getCurrentLoggers() as $logger) {
-			self::assertNull($logger->getLevel());
-			self::assertTrue($logger->getAdditivity());
-			self::assertEquals(0, count($logger->getAllAppenders()), 0);
-		}
-	}
-
-	public function testSettingParents() {
-		$hierarchy = $this->hierarchy;
-		$loggerDE = $hierarchy->getLogger("de");
-		$root = $loggerDE->getParent();
-		self::assertEquals('root', $root->getName());
-
-		$loggerDEBLUB = $hierarchy->getLogger("de.blub");
-		self::assertEquals('de.blub', $loggerDEBLUB->getName());
-		$p = $loggerDEBLUB->getParent();
-		self::assertEquals('de', $p->getName());
-
-		$loggerDEBLA = $hierarchy->getLogger("de.bla");
-		$p = $loggerDEBLA->getParent();
-		self::assertEquals('de', $p->getName());
-
-		$logger3 = $hierarchy->getLogger("de.bla.third");
-		$p = $logger3->getParent();
-		self::assertEquals('de.bla', $p->getName());
-
-		$p = $p->getParent();
-		self::assertEquals('de', $p->getName());
-	}
-
-	public function testExists() {
-		$hierarchy = $this->hierarchy;
-		$logger = $hierarchy->getLogger("de");
-
-		self::assertTrue($hierarchy->exists("de"));
-
-		$logger = $hierarchy->getLogger("de.blub");
-		self::assertTrue($hierarchy->exists("de.blub"));
-		self::assertTrue($hierarchy->exists("de"));
-
-		$logger = $hierarchy->getLogger("de.de");
-		self::assertTrue($hierarchy->exists("de.de"));
-	}
-
-	public function testClear() {
-		$hierarchy = $this->hierarchy;
-		$logger = $hierarchy->getLogger("de");
-		self::assertTrue($hierarchy->exists("de"));
-		$hierarchy->clear();
-		self::assertFalse($hierarchy->exists("de"));
-	}
+class HierarchyTest extends \PHPUnit_Framework_TestCase
+{
+    private $hierarchy;
+
+    protected function setUp()
+    {
+        $this->hierarchy = new Hierarchy(new RootLogger());
+    }
+
+    public function testResetConfiguration()
+    {
+        $root = $this->hierarchy->getRootLogger();
+        $appender = new ConsoleAppender('A1');
+        $root->addAppender($appender);
+
+        $logger = $this->hierarchy->getLogger('test');
+        self::assertEquals(1, count($this->hierarchy->getCurrentLoggers()));
+
+        $this->hierarchy->resetConfiguration();
+        self::assertEquals(Level::getLevelDebug(), $root->getLevel());
+        self::assertEquals(Level::getLevelAll(), $this->hierarchy->getThreshold());
+        self::assertEquals(1, count($this->hierarchy->getCurrentLoggers()));
+
+        foreach ($this->hierarchy->getCurrentLoggers() as $logger) {
+            self::assertNull($logger->getLevel());
+            self::assertTrue($logger->getAdditivity());
+            self::assertEquals(0, count($logger->getAllAppenders()), 0);
+        }
+    }
+
+    public function testSettingParents()
+    {
+        $hierarchy = $this->hierarchy;
+        $loggerDE = $hierarchy->getLogger("de");
+        $root = $loggerDE->getParent();
+        self::assertEquals('root', $root->getName());
+
+        $loggerDEBLUB = $hierarchy->getLogger("de.blub");
+        self::assertEquals('de.blub', $loggerDEBLUB->getName());
+        $p = $loggerDEBLUB->getParent();
+        self::assertEquals('de', $p->getName());
+
+        $loggerDEBLA = $hierarchy->getLogger("de.bla");
+        $p = $loggerDEBLA->getParent();
+        self::assertEquals('de', $p->getName());
+
+        $logger3 = $hierarchy->getLogger("de.bla.third");
+        $p = $logger3->getParent();
+        self::assertEquals('de.bla', $p->getName());
+
+        $p = $p->getParent();
+        self::assertEquals('de', $p->getName());
+    }
+
+    public function testExists()
+    {
+        $hierarchy = $this->hierarchy;
+        $logger = $hierarchy->getLogger("de");
+
+        self::assertTrue($hierarchy->exists("de"));
+
+        $logger = $hierarchy->getLogger("de.blub");
+        self::assertTrue($hierarchy->exists("de.blub"));
+        self::assertTrue($hierarchy->exists("de"));
+
+        $logger = $hierarchy->getLogger("de.de");
+        self::assertTrue($hierarchy->exists("de.de"));
+    }
+
+    public function testClear()
+    {
+        $hierarchy = $this->hierarchy;
+        $logger = $hierarchy->getLogger("de");
+        self::assertTrue($hierarchy->exists("de"));
+        $hierarchy->clear();
+        self::assertFalse($hierarchy->exists("de"));
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Layouts/HtmlLayoutTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Layouts/HtmlLayoutTest.php b/tests/src/Layouts/HtmlLayoutTest.php
index 902d3fc..b909328 100644
--- a/tests/src/Layouts/HtmlLayoutTest.php
+++ b/tests/src/Layouts/HtmlLayoutTest.php
@@ -30,50 +30,54 @@ use Apache\Log4php\Layouts\HtmlLayout;
 /**
  * @group layouts
  */
-class HtmlLayoutTest extends \PHPUnit_Framework_TestCase {
+class HtmlLayoutTest extends \PHPUnit_Framework_TestCase
+{
+    public function testErrorLayout()
+    {
+        $event = new LoggingEvent("HtmlLayoutTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
 
-	public function testErrorLayout() {
-		$event = new LoggingEvent("HtmlLayoutTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
-
-		$layout = new HtmlLayout();
-		$v = $layout->format($event);
+        $layout = new HtmlLayout();
+        $v = $layout->format($event);
 
-		$e = PHP_EOL."<tr>".PHP_EOL.
-			"<td>".round(1000*$event->getRelativeTime())."</td>".PHP_EOL.
-			"<td title=\"".$event->getThreadName()." thread\">".$event->getThreadName()."</td>".PHP_EOL.
-			"<td title=\"Level\">ERROR</td>".PHP_EOL.
-			"<td title=\"TEST category\">TEST</td>".PHP_EOL.
-			"<td title=\"Message\">testmessage</td>".PHP_EOL.
-			"</tr>".PHP_EOL;
+        $e = PHP_EOL."<tr>".PHP_EOL.
+            "<td>".round(1000*$event->getRelativeTime())."</td>".PHP_EOL.
+            "<td title=\"".$event->getThreadName()." thread\">".$event->getThreadName()."</td>".PHP_EOL.
+            "<td title=\"Level\">ERROR</td>".PHP_EOL.
+            "<td title=\"TEST category\">TEST</td>".PHP_EOL.
+            "<td title=\"Message\">testmessage</td>".PHP_EOL.
+            "</tr>".PHP_EOL;
 
-		self::assertEquals($v, $e);
+        self::assertEquals($v, $e);
     }
 
-    public function testWarnLayout() {
-		$event = new LoggingEvent("HtmlLayoutTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
+    public function testWarnLayout()
+    {
+        $event = new LoggingEvent("HtmlLayoutTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
 
-		$layout = new HtmlLayout();
-		$v = $layout->format($event);
+        $layout = new HtmlLayout();
+        $v = $layout->format($event);
 
-		$e = PHP_EOL."<tr>".PHP_EOL.
-			"<td>".round(1000*$event->getRelativeTime())."</td>".PHP_EOL.
-			"<td title=\"".$event->getThreadName()." thread\">".$event->getThreadName()."</td>".PHP_EOL.
-			"<td title=\"Level\"><font color=\"#993300\"><strong>WARN</strong></font></td>".PHP_EOL.
-			"<td title=\"TEST category\">TEST</td>".PHP_EOL.
-			"<td title=\"Message\">testmessage</td>".PHP_EOL.
-			"</tr>".PHP_EOL;
+        $e = PHP_EOL."<tr>".PHP_EOL.
+            "<td>".round(1000*$event->getRelativeTime())."</td>".PHP_EOL.
+            "<td title=\"".$event->getThreadName()." thread\">".$event->getThreadName()."</td>".PHP_EOL.
+            "<td title=\"Level\"><font color=\"#993300\"><strong>WARN</strong></font></td>".PHP_EOL.
+            "<td title=\"TEST category\">TEST</td>".PHP_EOL.
+            "<td title=\"Message\">testmessage</td>".PHP_EOL.
+            "</tr>".PHP_EOL;
 
-		self::assertEquals($v, $e);
+        self::assertEquals($v, $e);
     }
 
-    public function testContentType() {
+    public function testContentType()
+    {
         $layout = new HtmlLayout();
         $v = $layout->getContentType();
         $e = "text/html";
         self::assertEquals($v, $e);
     }
 
-    public function testTitle() {
+    public function testTitle()
+    {
         $layout = new HtmlLayout();
         $v = $layout->getTitle();
         $e = "Log4php Log Messages";
@@ -85,13 +89,15 @@ class HtmlLayoutTest extends \PHPUnit_Framework_TestCase {
         self::assertEquals($v, $e);
     }
 
-     public function testHeader() {
+     public function testHeader()
+     {
         $layout = new HtmlLayout();
         $v = $layout->getHeader();
         self::assertTrue(strpos($v, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">") === 0);
     }
 
-    public function testFooter() {
+    public function testFooter()
+    {
         $layout = new HtmlLayout();
         $v = $layout->getFooter();
         self::assertTrue(strpos($v, "</table>") === 0);

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Layouts/PatternLayoutTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Layouts/PatternLayoutTest.php b/tests/src/Layouts/PatternLayoutTest.php
index 71d331d..06d1999 100644
--- a/tests/src/Layouts/PatternLayoutTest.php
+++ b/tests/src/Layouts/PatternLayoutTest.php
@@ -28,29 +28,29 @@ use Apache\Log4php\Logger;
 /**
  * @group layouts
  */
-class PatternLayoutTest extends \PHPUnit_Framework_TestCase {
-
-	/** Pattern used for testing. */
-	private $pattern = "%-6level %logger: %msg from %class::%method() in %file at %line%n";
-
-	public function testComplexLayout() {
-
-		$config = TestHelper::getEchoPatternConfig($this->pattern);
-		Logger::configure($config);
-
-		ob_start();
-		$log = Logger::getLogger('LoggerTest');
-		$log->error("my message"); $line = __LINE__;
-		$actual = ob_get_contents();
-		ob_end_clean();
-
-		$file = __FILE__;
-		$class = __CLASS__;
-		$method = __FUNCTION__;
-
-		$expected = "ERROR  LoggerTest: my message from $class::$method() in $file at $line" . PHP_EOL;
-		self::assertSame($expected, $actual);
-
-		Logger::resetConfiguration();
+class PatternLayoutTest extends \PHPUnit_Framework_TestCase
+{
+    /** Pattern used for testing. */
+    private $pattern = "%-6level %logger: %msg from %class::%method() in %file at %line%n";
+
+    public function testComplexLayout()
+    {
+        $config = TestHelper::getEchoPatternConfig($this->pattern);
+        Logger::configure($config);
+
+        ob_start();
+        $log = Logger::getLogger('LoggerTest');
+        $log->error("my message"); $line = __LINE__;
+        $actual = ob_get_contents();
+        ob_end_clean();
+
+        $file = __FILE__;
+        $class = __CLASS__;
+        $method = __FUNCTION__;
+
+        $expected = "ERROR  LoggerTest: my message from $class::$method() in $file at $line" . PHP_EOL;
+        self::assertSame($expected, $actual);
+
+        Logger::resetConfiguration();
     }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Layouts/SerializedLayoutTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Layouts/SerializedLayoutTest.php b/tests/src/Layouts/SerializedLayoutTest.php
index 257fde2..8f33212 100644
--- a/tests/src/Layouts/SerializedLayoutTest.php
+++ b/tests/src/Layouts/SerializedLayoutTest.php
@@ -29,82 +29,86 @@ use Apache\Log4php\Logger;
 /**
  * @group layouts
  */
-class SerializedLayoutTest extends \PHPUnit_Framework_TestCase {
+class SerializedLayoutTest extends \PHPUnit_Framework_TestCase
+{
+    public function testLocationInfo()
+    {
+        $layout = new SerializedLayout();
+        self::assertFalse($layout->getLocationInfo());
+        $layout->setLocationInfo(true);
+        self::assertTrue($layout->getLocationInfo());
+        $layout->setLocationInfo(false);
+        self::assertFalse($layout->getLocationInfo());
+    }
 
-	public function testLocationInfo() {
-		$layout = new SerializedLayout();
-		self::assertFalse($layout->getLocationInfo());
-		$layout->setLocationInfo(true);
-		self::assertTrue($layout->getLocationInfo());
-		$layout->setLocationInfo(false);
-		self::assertFalse($layout->getLocationInfo());
-	}
+    /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid value given for 'locationInfo' property: ['foo']. Expected a boolean value. Property not changed.
+     */
+    public function testLocationInfoFail()
+    {
+        $layout = new SerializedLayout();
+        $layout->setLocationInfo('foo');
+    }
 
-	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid value given for 'locationInfo' property: ['foo']. Expected a boolean value. Property not changed.
-	 */
-	public function testLocationInfoFail() {
-		$layout = new SerializedLayout();
-		$layout->setLocationInfo('foo');
-	}
+    public function testLayout()
+    {
+        Logger::configure(array(
+            'appenders' => array(
+                'default' => array(
+                    'class' => 'EchoAppender',
+                    'layout' => array(
+                        'class' => 'SerializedLayout'
+                    )
+                )
+            ),
+            'rootLogger' => array(
+                'appenders' => array('default')
+            )
+        ));
 
-	public function testLayout() {
-		Logger::configure(array(
-			'appenders' => array(
-				'default' => array(
-					'class' => 'EchoAppender',
-					'layout' => array(
-						'class' => 'SerializedLayout'
-					)
-				)
-			),
-			'rootLogger' => array(
-				'appenders' => array('default')
-			)
-		));
+        ob_start();
+        $foo = Logger::getLogger('foo');
+        $foo->info("Interesting message.");
+        $actual = ob_get_contents();
+        ob_end_clean();
 
-		ob_start();
-		$foo = Logger::getLogger('foo');
-		$foo->info("Interesting message.");
-		$actual = ob_get_contents();
-		ob_end_clean();
+        $event = unserialize($actual);
 
-		$event = unserialize($actual);
+        self::assertInstanceOf('Apache\\Log4php\\LoggingEvent', $event);
+        self::assertEquals('Interesting message.', $event->getMessage());
+        self::assertEquals(Level::getLevelInfo(), $event->getLevel());
+    }
 
-		self::assertInstanceOf('Apache\\Log4php\\LoggingEvent', $event);
-		self::assertEquals('Interesting message.', $event->getMessage());
-		self::assertEquals(Level::getLevelInfo(), $event->getLevel());
-	}
+    public function testLayoutWithLocationInfo()
+    {
+        Logger::configure(array(
+            'appenders' => array(
+                'default' => array(
+                    'class' => 'EchoAppender',
+                    'layout' => array(
+                        'class' => 'SerializedLayout',
+                        'params' => array(
+                            'locationInfo' => true
+                        )
+                    )
+                )
+            ),
+            'rootLogger' => array(
+                'appenders' => array('default')
+            )
+        ));
 
-	public function testLayoutWithLocationInfo() {
-		Logger::configure(array(
-			'appenders' => array(
-				'default' => array(
-					'class' => 'EchoAppender',
-					'layout' => array(
-						'class' => 'SerializedLayout',
-						'params' => array(
-							'locationInfo' => true
-						)
-					)
-				)
-			),
-			'rootLogger' => array(
-				'appenders' => array('default')
-			)
-		));
+        ob_start();
+        $foo = Logger::getLogger('foo');
+        $foo->info("Interesting message.");
+        $actual = ob_get_contents();
+        ob_end_clean();
 
-		ob_start();
-		$foo = Logger::getLogger('foo');
-		$foo->info("Interesting message.");
-		$actual = ob_get_contents();
-		ob_end_clean();
+        $event = unserialize($actual);
 
-		$event = unserialize($actual);
-
-		self::assertInstanceOf('Apache\\Log4php\\LoggingEvent', $event);
-		self::assertEquals('Interesting message.', $event->getMessage());
-		self::assertEquals(Level::getLevelInfo(), $event->getLevel());
-	}
+        self::assertInstanceOf('Apache\\Log4php\\LoggingEvent', $event);
+        self::assertEquals('Interesting message.', $event->getMessage());
+        self::assertEquals(Level::getLevelInfo(), $event->getLevel());
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Layouts/SimpleLayoutTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Layouts/SimpleLayoutTest.php b/tests/src/Layouts/SimpleLayoutTest.php
index f33057d..fa3bb3b 100644
--- a/tests/src/Layouts/SimpleLayoutTest.php
+++ b/tests/src/Layouts/SimpleLayoutTest.php
@@ -30,14 +30,15 @@ use Apache\Log4php\Layouts\SimpleLayout;
 /**
  * @group layouts
  */
-class SimpleLayoutTest extends \PHPUnit_Framework_TestCase {
+class SimpleLayoutTest extends \PHPUnit_Framework_TestCase
+{
+    public function testSimpleLayout()
+    {
+        $event = new LoggingEvent("SimpleLayoutTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
 
-	public function testSimpleLayout() {
-		$event = new LoggingEvent("SimpleLayoutTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
-
-		$layout = new SimpleLayout();
-		$actual = $layout->format($event);
-		$expected = "ERROR - testmessage" . PHP_EOL;
-		self::assertEquals($expected, $actual);
-	}
+        $layout = new SimpleLayout();
+        $actual = $layout->format($event);
+        $expected = "ERROR - testmessage" . PHP_EOL;
+        self::assertEquals($expected, $actual);
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Layouts/XmlLayoutTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Layouts/XmlLayoutTest.php b/tests/src/Layouts/XmlLayoutTest.php
index bbcb7dd..a55b9e8 100644
--- a/tests/src/Layouts/XmlLayoutTest.php
+++ b/tests/src/Layouts/XmlLayoutTest.php
@@ -31,123 +31,126 @@ use Apache\Log4php\MDC;
 /**
  * @group layouts
  */
-class XmlLayoutTest extends \PHPUnit_Framework_TestCase {
+class XmlLayoutTest extends \PHPUnit_Framework_TestCase
+{
+    public function testErrorLayout()
+    {
+        $event = TestHelper::getErrorEvent("testmessage");
 
-	public function testErrorLayout() {
-		$event = TestHelper::getErrorEvent("testmessage");
+        $layout = new XmlLayout();
+        $layout->activateOptions();
 
-		$layout = new XmlLayout();
-		$layout->activateOptions();
+        $actual = $layout->format($event);
 
-		$actual = $layout->format($event);
+        $thread = $event->getThreadName();
+        $timestamp = number_format(($event->getTimeStamp() * 1000), 0, '', '');
 
-		$thread = $event->getThreadName();
-		$timestamp = number_format(($event->getTimeStamp() * 1000), 0, '', '');
+        $expected = "<log4php:event logger=\"test\" level=\"ERROR\" thread=\"$thread\" timestamp=\"$timestamp\">" . PHP_EOL .
+            "<log4php:message><![CDATA[testmessage]]></log4php:message>" . PHP_EOL .
+            "<log4php:locationInfo class=\"Apache\\Log4php\\LoggingEvent\" file=\"NA\" line=\"NA\" " .
+            "method=\"getLocationInformation\" />" . PHP_EOL .
+            "</log4php:event>" . PHP_EOL;
 
-		$expected = "<log4php:event logger=\"test\" level=\"ERROR\" thread=\"$thread\" timestamp=\"$timestamp\">" . PHP_EOL .
-			"<log4php:message><![CDATA[testmessage]]></log4php:message>" . PHP_EOL .
-			"<log4php:locationInfo class=\"Apache\\Log4php\\LoggingEvent\" file=\"NA\" line=\"NA\" " .
-			"method=\"getLocationInformation\" />" . PHP_EOL .
-			"</log4php:event>" . PHP_EOL;
+        self::assertEquals($expected, $actual);
+    }
 
-		self::assertEquals($expected, $actual);
-	}
+    public function testWarnLayout()
+    {
+        $event = TestHelper::getWarnEvent("testmessage");
 
-	public function testWarnLayout() {
-		$event = TestHelper::getWarnEvent("testmessage");
+        $layout = new XmlLayout();
+        $layout->activateOptions();
 
-		$layout = new XmlLayout();
-		$layout->activateOptions();
+        $actual = $layout->format($event);
 
-		$actual = $layout->format($event);
+        $thread = $event->getThreadName();
+        $timestamp = number_format(($event->getTimeStamp() * 1000), 0, '', '');
 
-		$thread = $event->getThreadName();
-		$timestamp = number_format(($event->getTimeStamp() * 1000), 0, '', '');
+        $expected = "<log4php:event logger=\"test\" level=\"WARN\" thread=\"$thread\" timestamp=\"$timestamp\">" . PHP_EOL .
+            "<log4php:message><![CDATA[testmessage]]></log4php:message>" . PHP_EOL .
+            "<log4php:locationInfo class=\"Apache\\Log4php\\LoggingEvent\" file=\"NA\" line=\"NA\" "  .
+            "method=\"getLocationInformation\" />" . PHP_EOL .
+            "</log4php:event>" . PHP_EOL;
 
-		$expected = "<log4php:event logger=\"test\" level=\"WARN\" thread=\"$thread\" timestamp=\"$timestamp\">" . PHP_EOL .
-			"<log4php:message><![CDATA[testmessage]]></log4php:message>" . PHP_EOL .
-			"<log4php:locationInfo class=\"Apache\\Log4php\\LoggingEvent\" file=\"NA\" line=\"NA\" "  .
-			"method=\"getLocationInformation\" />" . PHP_EOL .
-			"</log4php:event>" . PHP_EOL;
+        self::assertEquals($expected, $actual);
+    }
 
-		self::assertEquals($expected, $actual);
-	}
+    public function testLog4JNamespaceErrorLayout()
+    {
+        $event = TestHelper::getErrorEvent("testmessage");
 
-	public function testLog4JNamespaceErrorLayout() {
-		$event = TestHelper::getErrorEvent("testmessage");
+        $layout = new XmlLayout();
+        $layout->setLog4jNamespace(true);
+        $layout->activateOptions();
 
-		$layout = new XmlLayout();
-		$layout->setLog4jNamespace(true);
-		$layout->activateOptions();
+        $actual = $layout->format($event);
 
-		$actual = $layout->format($event);
+        $thread = $event->getThreadName();
+        $timestamp = number_format(($event->getTimeStamp() * 1000), 0, '', '');
 
-		$thread = $event->getThreadName();
-		$timestamp = number_format(($event->getTimeStamp() * 1000), 0, '', '');
+        $expected = "<log4j:event logger=\"test\" level=\"ERROR\" thread=\"$thread\" timestamp=\"$timestamp\">" . PHP_EOL .
+            "<log4j:message><![CDATA[testmessage]]></log4j:message>" . PHP_EOL .
+            "<log4j:locationInfo class=\"Apache\\Log4php\\LoggingEvent\" file=\"NA\" line=\"NA\" "  .
+            "method=\"getLocationInformation\" />" . PHP_EOL .
+            "</log4j:event>" . PHP_EOL;
 
-		$expected = "<log4j:event logger=\"test\" level=\"ERROR\" thread=\"$thread\" timestamp=\"$timestamp\">" . PHP_EOL .
-			"<log4j:message><![CDATA[testmessage]]></log4j:message>" . PHP_EOL .
-			"<log4j:locationInfo class=\"Apache\\Log4php\\LoggingEvent\" file=\"NA\" line=\"NA\" "  .
-			"method=\"getLocationInformation\" />" . PHP_EOL .
-			"</log4j:event>" . PHP_EOL;
+        self::assertEquals($expected, $actual);
+    }
 
-		self::assertEquals($expected, $actual);
-	}
+    public function testNDC()
+    {
+        NDC::push('foo');
+        NDC::push('bar');
 
-	public function testNDC()
-	{
-		NDC::push('foo');
-		NDC::push('bar');
+        $event = TestHelper::getErrorEvent("testmessage");
 
-		$event = TestHelper::getErrorEvent("testmessage");
+        $layout = new XmlLayout();
+        $layout->activateOptions();
 
-		$layout = new XmlLayout();
-		$layout->activateOptions();
+        $actual = $layout->format($event);
 
-		$actual = $layout->format($event);
+        $thread = $event->getThreadName();
+        $timestamp = number_format(($event->getTimeStamp() * 1000), 0, '', '');
 
-		$thread = $event->getThreadName();
-		$timestamp = number_format(($event->getTimeStamp() * 1000), 0, '', '');
+        $expected = "<log4php:event logger=\"test\" level=\"ERROR\" thread=\"$thread\" timestamp=\"$timestamp\">" . PHP_EOL .
+            "<log4php:message><![CDATA[testmessage]]></log4php:message>" . PHP_EOL .
+            "<log4php:NDC><![CDATA[<![CDATA[foo bar]]>]]></log4php:NDC>"  .  PHP_EOL  .
+            "<log4php:locationInfo class=\"Apache\\Log4php\\LoggingEvent\" file=\"NA\" line=\"NA\" "  .
+            "method=\"getLocationInformation\" />" . PHP_EOL .
+            "</log4php:event>" . PHP_EOL;
 
-		$expected = "<log4php:event logger=\"test\" level=\"ERROR\" thread=\"$thread\" timestamp=\"$timestamp\">" . PHP_EOL .
-			"<log4php:message><![CDATA[testmessage]]></log4php:message>" . PHP_EOL .
-			"<log4php:NDC><![CDATA[<![CDATA[foo bar]]>]]></log4php:NDC>"  .  PHP_EOL  .
-			"<log4php:locationInfo class=\"Apache\\Log4php\\LoggingEvent\" file=\"NA\" line=\"NA\" "  .
-			"method=\"getLocationInformation\" />" . PHP_EOL .
-			"</log4php:event>" . PHP_EOL;
+        self::assertEquals($expected, $actual);
 
-		self::assertEquals($expected, $actual);
+        NDC::clear();
+    }
 
-		NDC::clear();
-	}
+    public function testMDC()
+    {
+        MDC::put('foo', 'bar');
+        MDC::put('bla', 'tra');
 
-	public function testMDC()
-	{
-		MDC::put('foo', 'bar');
-		MDC::put('bla', 'tra');
+        $event = TestHelper::getErrorEvent("testmessage");
 
-		$event = TestHelper::getErrorEvent("testmessage");
+        $layout = new XmlLayout();
+        $layout->activateOptions();
 
-		$layout = new XmlLayout();
-		$layout->activateOptions();
+        $actual = $layout->format($event);
 
-		$actual = $layout->format($event);
+        $thread = $event->getThreadName();
+        $timestamp = number_format(($event->getTimeStamp() * 1000), 0, '', '');
 
-		$thread = $event->getThreadName();
-		$timestamp = number_format(($event->getTimeStamp() * 1000), 0, '', '');
+        $expected = "<log4php:event logger=\"test\" level=\"ERROR\" thread=\"$thread\" timestamp=\"$timestamp\">" . PHP_EOL .
+                "<log4php:message><![CDATA[testmessage]]></log4php:message>" . PHP_EOL .
+                "<log4php:properties>" . PHP_EOL .
+                "<log4php:data name=\"foo\" value=\"bar\" />" . PHP_EOL .
+                "<log4php:data name=\"bla\" value=\"tra\" />" . PHP_EOL .
+                "</log4php:properties>" . PHP_EOL .
+                "<log4php:locationInfo class=\"Apache\\Log4php\\LoggingEvent\" file=\"NA\" line=\"NA\" "  .
+                "method=\"getLocationInformation\" />" . PHP_EOL .
+                "</log4php:event>" . PHP_EOL;
 
-		$expected = "<log4php:event logger=\"test\" level=\"ERROR\" thread=\"$thread\" timestamp=\"$timestamp\">" . PHP_EOL .
-				"<log4php:message><![CDATA[testmessage]]></log4php:message>" . PHP_EOL .
-				"<log4php:properties>" . PHP_EOL .
-				"<log4php:data name=\"foo\" value=\"bar\" />" . PHP_EOL .
-				"<log4php:data name=\"bla\" value=\"tra\" />" . PHP_EOL .
-				"</log4php:properties>" . PHP_EOL .
-				"<log4php:locationInfo class=\"Apache\\Log4php\\LoggingEvent\" file=\"NA\" line=\"NA\" "  .
-				"method=\"getLocationInformation\" />" . PHP_EOL .
-				"</log4php:event>" . PHP_EOL;
+        self::assertEquals($expected, $actual);
 
-		self::assertEquals($expected, $actual);
-
-		MDC::clear();
-	}
+        MDC::clear();
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/LevelTest.php
----------------------------------------------------------------------
diff --git a/tests/src/LevelTest.php b/tests/src/LevelTest.php
index 29ece9b..0933bf2 100644
--- a/tests/src/LevelTest.php
+++ b/tests/src/LevelTest.php
@@ -27,60 +27,69 @@ use Apache\Log4php\Level;
 /**
  * @group main
  */
-class LevelTest extends \PHPUnit_Framework_TestCase {
-
-	protected function doTestLevel($level, $code, $str, $syslog) {
-		self::assertTrue($level instanceof Level);
-		self::assertEquals($level->toInt(), $code);
-		self::assertEquals($level->toString(), $str);
-		self::assertEquals($level->getSyslogEquivalent(), $syslog);
-	}
+class LevelTest extends \PHPUnit_Framework_TestCase
+{
+    protected function doTestLevel($level, $code, $str, $syslog)
+    {
+        self::assertTrue($level instanceof Level);
+        self::assertEquals($level->toInt(), $code);
+        self::assertEquals($level->toString(), $str);
+        self::assertEquals($level->getSyslogEquivalent(), $syslog);
+    }
 
-	public function testLevelOff() {
-		$this->doTestLevel(Level::getLevelOff(), Level::OFF, 'OFF', LOG_ALERT);
-		$this->doTestLevel(Level::toLevel(Level::OFF), Level::OFF, 'OFF', LOG_ALERT);
-		$this->doTestLevel(Level::toLevel('OFF'), Level::OFF, 'OFF', LOG_ALERT);
+    public function testLevelOff()
+    {
+        $this->doTestLevel(Level::getLevelOff(), Level::OFF, 'OFF', LOG_ALERT);
+        $this->doTestLevel(Level::toLevel(Level::OFF), Level::OFF, 'OFF', LOG_ALERT);
+        $this->doTestLevel(Level::toLevel('OFF'), Level::OFF, 'OFF', LOG_ALERT);
     }
 
-	public function testLevelFatal() {
-		$this->doTestLevel(Level::getLevelFatal(), Level::FATAL, 'FATAL', LOG_ALERT);
-		$this->doTestLevel(Level::toLevel(Level::FATAL), Level::FATAL, 'FATAL', LOG_ALERT);
-		$this->doTestLevel(Level::toLevel('FATAL'), Level::FATAL, 'FATAL', LOG_ALERT);
+    public function testLevelFatal()
+    {
+        $this->doTestLevel(Level::getLevelFatal(), Level::FATAL, 'FATAL', LOG_ALERT);
+        $this->doTestLevel(Level::toLevel(Level::FATAL), Level::FATAL, 'FATAL', LOG_ALERT);
+        $this->doTestLevel(Level::toLevel('FATAL'), Level::FATAL, 'FATAL', LOG_ALERT);
     }
 
-	public function testLevelError() {
-		$this->doTestLevel(Level::getLevelError(), Level::ERROR, 'ERROR', LOG_ERR);
-		$this->doTestLevel(Level::toLevel(Level::ERROR), Level::ERROR, 'ERROR', LOG_ERR);
-		$this->doTestLevel(Level::toLevel('ERROR'), Level::ERROR, 'ERROR', LOG_ERR);
+    public function testLevelError()
+    {
+        $this->doTestLevel(Level::getLevelError(), Level::ERROR, 'ERROR', LOG_ERR);
+        $this->doTestLevel(Level::toLevel(Level::ERROR), Level::ERROR, 'ERROR', LOG_ERR);
+        $this->doTestLevel(Level::toLevel('ERROR'), Level::ERROR, 'ERROR', LOG_ERR);
     }
 
-	public function testLevelWarn() {
-		$this->doTestLevel(Level::getLevelWarn(), Level::WARN, 'WARN', LOG_WARNING);
-		$this->doTestLevel(Level::toLevel(Level::WARN), Level::WARN, 'WARN', LOG_WARNING);
-		$this->doTestLevel(Level::toLevel('WARN'), Level::WARN, 'WARN', LOG_WARNING);
+    public function testLevelWarn()
+    {
+        $this->doTestLevel(Level::getLevelWarn(), Level::WARN, 'WARN', LOG_WARNING);
+        $this->doTestLevel(Level::toLevel(Level::WARN), Level::WARN, 'WARN', LOG_WARNING);
+        $this->doTestLevel(Level::toLevel('WARN'), Level::WARN, 'WARN', LOG_WARNING);
     }
 
-	public function testLevelInfo() {
-		$this->doTestLevel(Level::getLevelInfo(), Level::INFO, 'INFO', LOG_INFO);
-		$this->doTestLevel(Level::toLevel(Level::INFO), Level::INFO, 'INFO', LOG_INFO);
-		$this->doTestLevel(Level::toLevel('INFO'), Level::INFO, 'INFO', LOG_INFO);
+    public function testLevelInfo()
+    {
+        $this->doTestLevel(Level::getLevelInfo(), Level::INFO, 'INFO', LOG_INFO);
+        $this->doTestLevel(Level::toLevel(Level::INFO), Level::INFO, 'INFO', LOG_INFO);
+        $this->doTestLevel(Level::toLevel('INFO'), Level::INFO, 'INFO', LOG_INFO);
     }
 
-	public function testLevelDebug() {
-		$this->doTestLevel(Level::getLevelDebug(), Level::DEBUG, 'DEBUG', LOG_DEBUG);
-		$this->doTestLevel(Level::toLevel(Level::DEBUG), Level::DEBUG, 'DEBUG', LOG_DEBUG);
-		$this->doTestLevel(Level::toLevel('DEBUG'), Level::DEBUG, 'DEBUG', LOG_DEBUG);
-	}
+    public function testLevelDebug()
+    {
+        $this->doTestLevel(Level::getLevelDebug(), Level::DEBUG, 'DEBUG', LOG_DEBUG);
+        $this->doTestLevel(Level::toLevel(Level::DEBUG), Level::DEBUG, 'DEBUG', LOG_DEBUG);
+        $this->doTestLevel(Level::toLevel('DEBUG'), Level::DEBUG, 'DEBUG', LOG_DEBUG);
+    }
 
-    public function testLevelTrace() {
-		$this->doTestLevel(Level::getLevelTrace(), Level::TRACE, 'TRACE', LOG_DEBUG);
-		$this->doTestLevel(Level::toLevel(Level::TRACE), Level::TRACE, 'TRACE', LOG_DEBUG);
-		$this->doTestLevel(Level::toLevel('TRACE'), Level::TRACE, 'TRACE', LOG_DEBUG);
+    public function testLevelTrace()
+    {
+        $this->doTestLevel(Level::getLevelTrace(), Level::TRACE, 'TRACE', LOG_DEBUG);
+        $this->doTestLevel(Level::toLevel(Level::TRACE), Level::TRACE, 'TRACE', LOG_DEBUG);
+        $this->doTestLevel(Level::toLevel('TRACE'), Level::TRACE, 'TRACE', LOG_DEBUG);
     }
 
-	public function testLevelAll() {
-		$this->doTestLevel(Level::getLevelAll(), Level::ALL, 'ALL', LOG_DEBUG);
-		$this->doTestLevel(Level::toLevel(Level::ALL), Level::ALL, 'ALL', LOG_DEBUG);
-		$this->doTestLevel(Level::toLevel('ALL'), Level::ALL, 'ALL', LOG_DEBUG);
+    public function testLevelAll()
+    {
+        $this->doTestLevel(Level::getLevelAll(), Level::ALL, 'ALL', LOG_DEBUG);
+        $this->doTestLevel(Level::toLevel(Level::ALL), Level::ALL, 'ALL', LOG_DEBUG);
+        $this->doTestLevel(Level::toLevel('ALL'), Level::ALL, 'ALL', LOG_DEBUG);
     }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/LoggerTest.php
----------------------------------------------------------------------
diff --git a/tests/src/LoggerTest.php b/tests/src/LoggerTest.php
index a511aa4..e231248 100644
--- a/tests/src/LoggerTest.php
+++ b/tests/src/LoggerTest.php
@@ -27,199 +27,209 @@ use Apache\Log4php\Logger;
 /**
  * @group main
  */
-class LoggerTest extends \PHPUnit_Framework_TestCase {
-
-	private $testConfig1 = array (
-		'rootLogger' =>	array (
-			'level' => 'ERROR',
-			'appenders' => array (
-				'default',
-			),
-		),
-		'appenders' => array (
-			'default' => array (
-				'class' => 'EchoAppender',
-			),
-		),
-		'loggers' => array (
-			'mylogger' => array (
-				'additivity' => 'false',
-				'level' => 'DEBUG',
-				'appenders' => array (
-					'default',
-				),
-			),
-		),
-	);
-
-	// For testing additivity
-	private $testConfig2 = array (
-		'appenders' => array (
-			'default' => array (
-				'class' => 'EchoAppender',
-			),
-		),
-		'rootLogger' => array(
-			'appenders' => array('default'),
-		),
-		'loggers' => array (
-			'foo' => array (
-				'appenders' => array (
-					'default',
-				),
-			),
-			'foo.bar' => array (
-				'appenders' => array (
-					'default',
-				),
-			),
-			'foo.bar.baz' => array (
-				'appenders' => array (
-					'default',
-				),
-			),
-		),
-	);
-
-	// For testing additivity
-	private $testConfig3 = array (
-		'appenders' => array (
-			'default' => array (
-				'class' => 'EchoAppender',
-			),
-		),
-		'rootLogger' => array(
-			'appenders' => array('default'),
-		),
-		'loggers' => array (
-			'foo' => array (
-				'appenders' => array (
-					'default',
-				),
-			),
-			'foo.bar' => array (
-				'appenders' => array (
-					'default',
-				),
-			),
-			'foo.bar.baz' => array (
-				'level' => 'ERROR',
-				'appenders' => array (
-					'default',
-				),
-			),
-		),
-	);
-
-	protected function setUp() {
-		Logger::clear();
-		Logger::resetConfiguration();
-	}
-
-	protected function tearDown() {
-		Logger::clear();
-		Logger::resetConfiguration();
-	}
-
-	public function testLoggerExist() {
-		$l = Logger::getLogger('test');
-		self::assertEquals($l->getName(), 'test');
-		self::assertTrue(Logger::exists('test'));
-	}
-
-	public function testCanGetRootLogger() {
-		$l = Logger::getRootLogger();
-		self::assertEquals($l->getName(), 'root');
-	}
-
-	public function testCanGetASpecificLogger() {
-		$l = Logger::getLogger('test');
-		self::assertEquals($l->getName(), 'test');
-	}
-
-	public function testCanLogToAllLevels() {
-		Logger::configure($this->testConfig1);
-
-		$logger = Logger::getLogger('mylogger');
-		ob_start();
-		$logger->info('this is an info');
-		$logger->warn('this is a warning');
-		$logger->error('this is an error');
-		$logger->debug('this is a debug message');
-		$logger->fatal('this is a fatal message');
-		$v = ob_get_contents();
-		ob_end_clean();
-
-		$e = 'INFO - this is an info'.PHP_EOL;
-		$e .= 'WARN - this is a warning'.PHP_EOL;
-		$e .= 'ERROR - this is an error'.PHP_EOL;
-		$e .= 'DEBUG - this is a debug message'.PHP_EOL;
-		$e .= 'FATAL - this is a fatal message'.PHP_EOL;
-
-		self::assertEquals($v, $e);
-	}
-
-	public function testIsEnabledFor() {
-		Logger::configure($this->testConfig1);
-
-		$logger = Logger::getLogger('mylogger');
-
-		self::assertFalse($logger->isTraceEnabled());
-		self::assertTrue($logger->isDebugEnabled());
-		self::assertTrue($logger->isInfoEnabled());
-		self::assertTrue($logger->isWarnEnabled());
-		self::assertTrue($logger->isErrorEnabled());
-		self::assertTrue($logger->isFatalEnabled());
-
-		$logger = Logger::getRootLogger();
-
-		self::assertFalse($logger->isTraceEnabled());
-		self::assertFalse($logger->isDebugEnabled());
-		self::assertFalse($logger->isInfoEnabled());
-		self::assertFalse($logger->isWarnEnabled());
-		self::assertTrue($logger->isErrorEnabled());
-		self::assertTrue($logger->isFatalEnabled());
-	}
-
-	public function testGetCurrentLoggers() {
-		Logger::clear();
-		Logger::resetConfiguration();
-
-		self::assertEquals(0, count(Logger::getCurrentLoggers()));
-
-		Logger::configure($this->testConfig1);
-		self::assertEquals(1, count(Logger::getCurrentLoggers()));
-		$list = Logger::getCurrentLoggers();
-		self::assertEquals('mylogger', $list[0]->getName());
-	}
-
-	public function testAdditivity() {
-		Logger::configure($this->testConfig2);
-
-		$logger = Logger::getLogger('foo.bar.baz');
-		ob_start();
-		$logger->info('test');
-		$actual = ob_get_contents();
-		ob_end_clean();
-
-		// The message should get logged 4 times: once by every logger in the
-		//  hierarchy (including root)
-		$expected = str_repeat('INFO - test' . PHP_EOL, 4);
-		self::assertSame($expected, $actual);
-	}
-
-	public function testAdditivity2() {
-		Logger::configure($this->testConfig3);
-
-		$logger = Logger::getLogger('foo.bar.baz');
-		ob_start();
-		$logger->info('test');
-		$actual = ob_get_contents();
-		ob_end_clean();
-
-		// The message should get logged 3 times: once by every logger in the
-		//  hierarchy, except foo.bar.baz which is set to level ERROR
-		$expected = str_repeat('INFO - test' . PHP_EOL, 3);
-		self::assertSame($expected, $actual);
-	}
+class LoggerTest extends \PHPUnit_Framework_TestCase
+{
+    private $testConfig1 = array (
+        'rootLogger' =>	array (
+            'level' => 'ERROR',
+            'appenders' => array (
+                'default',
+            ),
+        ),
+        'appenders' => array (
+            'default' => array (
+                'class' => 'EchoAppender',
+            ),
+        ),
+        'loggers' => array (
+            'mylogger' => array (
+                'additivity' => 'false',
+                'level' => 'DEBUG',
+                'appenders' => array (
+                    'default',
+                ),
+            ),
+        ),
+    );
+
+    // For testing additivity
+    private $testConfig2 = array (
+        'appenders' => array (
+            'default' => array (
+                'class' => 'EchoAppender',
+            ),
+        ),
+        'rootLogger' => array(
+            'appenders' => array('default'),
+        ),
+        'loggers' => array (
+            'foo' => array (
+                'appenders' => array (
+                    'default',
+                ),
+            ),
+            'foo.bar' => array (
+                'appenders' => array (
+                    'default',
+                ),
+            ),
+            'foo.bar.baz' => array (
+                'appenders' => array (
+                    'default',
+                ),
+            ),
+        ),
+    );
+
+    // For testing additivity
+    private $testConfig3 = array (
+        'appenders' => array (
+            'default' => array (
+                'class' => 'EchoAppender',
+            ),
+        ),
+        'rootLogger' => array(
+            'appenders' => array('default'),
+        ),
+        'loggers' => array (
+            'foo' => array (
+                'appenders' => array (
+                    'default',
+                ),
+            ),
+            'foo.bar' => array (
+                'appenders' => array (
+                    'default',
+                ),
+            ),
+            'foo.bar.baz' => array (
+                'level' => 'ERROR',
+                'appenders' => array (
+                    'default',
+                ),
+            ),
+        ),
+    );
+
+    protected function setUp()
+    {
+        Logger::clear();
+        Logger::resetConfiguration();
+    }
+
+    protected function tearDown()
+    {
+        Logger::clear();
+        Logger::resetConfiguration();
+    }
+
+    public function testLoggerExist()
+    {
+        $l = Logger::getLogger('test');
+        self::assertEquals($l->getName(), 'test');
+        self::assertTrue(Logger::exists('test'));
+    }
+
+    public function testCanGetRootLogger()
+    {
+        $l = Logger::getRootLogger();
+        self::assertEquals($l->getName(), 'root');
+    }
+
+    public function testCanGetASpecificLogger()
+    {
+        $l = Logger::getLogger('test');
+        self::assertEquals($l->getName(), 'test');
+    }
+
+    public function testCanLogToAllLevels()
+    {
+        Logger::configure($this->testConfig1);
+
+        $logger = Logger::getLogger('mylogger');
+        ob_start();
+        $logger->info('this is an info');
+        $logger->warn('this is a warning');
+        $logger->error('this is an error');
+        $logger->debug('this is a debug message');
+        $logger->fatal('this is a fatal message');
+        $v = ob_get_contents();
+        ob_end_clean();
+
+        $e = 'INFO - this is an info'.PHP_EOL;
+        $e .= 'WARN - this is a warning'.PHP_EOL;
+        $e .= 'ERROR - this is an error'.PHP_EOL;
+        $e .= 'DEBUG - this is a debug message'.PHP_EOL;
+        $e .= 'FATAL - this is a fatal message'.PHP_EOL;
+
+        self::assertEquals($v, $e);
+    }
+
+    public function testIsEnabledFor()
+    {
+        Logger::configure($this->testConfig1);
+
+        $logger = Logger::getLogger('mylogger');
+
+        self::assertFalse($logger->isTraceEnabled());
+        self::assertTrue($logger->isDebugEnabled());
+        self::assertTrue($logger->isInfoEnabled());
+        self::assertTrue($logger->isWarnEnabled());
+        self::assertTrue($logger->isErrorEnabled());
+        self::assertTrue($logger->isFatalEnabled());
+
+        $logger = Logger::getRootLogger();
+
+        self::assertFalse($logger->isTraceEnabled());
+        self::assertFalse($logger->isDebugEnabled());
+        self::assertFalse($logger->isInfoEnabled());
+        self::assertFalse($logger->isWarnEnabled());
+        self::assertTrue($logger->isErrorEnabled());
+        self::assertTrue($logger->isFatalEnabled());
+    }
+
+    public function testGetCurrentLoggers()
+    {
+        Logger::clear();
+        Logger::resetConfiguration();
+
+        self::assertEquals(0, count(Logger::getCurrentLoggers()));
+
+        Logger::configure($this->testConfig1);
+        self::assertEquals(1, count(Logger::getCurrentLoggers()));
+        $list = Logger::getCurrentLoggers();
+        self::assertEquals('mylogger', $list[0]->getName());
+    }
+
+    public function testAdditivity()
+    {
+        Logger::configure($this->testConfig2);
+
+        $logger = Logger::getLogger('foo.bar.baz');
+        ob_start();
+        $logger->info('test');
+        $actual = ob_get_contents();
+        ob_end_clean();
+
+        // The message should get logged 4 times: once by every logger in the
+        //  hierarchy (including root)
+        $expected = str_repeat('INFO - test' . PHP_EOL, 4);
+        self::assertSame($expected, $actual);
+    }
+
+    public function testAdditivity2()
+    {
+        Logger::configure($this->testConfig3);
+
+        $logger = Logger::getLogger('foo.bar.baz');
+        ob_start();
+        $logger->info('test');
+        $actual = ob_get_contents();
+        ob_end_clean();
+
+        // The message should get logged 3 times: once by every logger in the
+        //  hierarchy, except foo.bar.baz which is set to level ERROR
+        $expected = str_repeat('INFO - test' . PHP_EOL, 3);
+        self::assertSame($expected, $actual);
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/LoggingEventTest.php
----------------------------------------------------------------------
diff --git a/tests/src/LoggingEventTest.php b/tests/src/LoggingEventTest.php
index f07e7c3..9aff60e 100644
--- a/tests/src/LoggingEventTest.php
+++ b/tests/src/LoggingEventTest.php
@@ -29,111 +29,120 @@ use Apache\Log4php\Level;
 use Apache\Log4php\Logger;
 use Apache\Log4php\LoggingEvent;
 
-class LoggingEventTestCaseAppender extends NullAppender {
-
-	protected $requiresLayout = true;
-
-	public function append(LoggingEvent $event) {
-		$this->layout->format($event);
-	}
+class LoggingEventTestCaseAppender extends NullAppender
+{
+    protected $requiresLayout = true;
+
+    public function append(LoggingEvent $event)
+    {
+        $this->layout->format($event);
+    }
 }
 
-class LoggingEventTestCaseLayout extends AbstractLayout {
-
-	public function activateOptions() {
-		return;
-	}
+class LoggingEventTestCaseLayout extends AbstractLayout
+{
+    public function activateOptions()
+    {
+        return;
+    }
 
-	public function format(LoggingEvent $event) {
-		LoggingEventTest::$locationInfo  = $event->getLocationInformation();
+    public function format(LoggingEvent $event)
+    {
+        LoggingEventTest::$locationInfo  = $event->getLocationInformation();
         LoggingEventTest::$throwableInfo = $event->getThrowableInformation();
-	}
+    }
 }
 
 /**
  * @group main
  */
-class LoggingEventTest extends \PHPUnit_Framework_TestCase {
-
-	public static $locationInfo;
+class LoggingEventTest extends \PHPUnit_Framework_TestCase
+{
+    public static $locationInfo;
     public static $throwableInfo;
 
-	public function testConstructWithLoggerName() {
-		$l = Level::getLevelDebug();
-		$e = new LoggingEvent('fqcn', 'TestLogger', $l, 'test');
-		self::assertEquals($e->getLoggerName(), 'TestLogger');
-	}
-
-	public function testConstructWithTimestamp() {
-		$l = Level::getLevelDebug();
-		$timestamp = microtime(true);
-		$e = new LoggingEvent('fqcn', 'TestLogger', $l, 'test', $timestamp);
-		self::assertEquals($e->getTimeStamp(), $timestamp);
- 	}
-
-	public function testGetStartTime() {
-		$time = LoggingEvent::getStartTime();
-		self::assertInternalType('float', $time);
-		$time2 = LoggingEvent::getStartTime();
-		self::assertEquals($time, $time2);
-	}
-
-	public function testGetLocationInformation() {
-		$hierarchy = Logger::getHierarchy();
-		$root = $hierarchy->getRootLogger();
-
-		$a = new LoggingEventTestCaseAppender('A1');
-		$a->setLayout(new LoggingEventTestCaseLayout());
-		$root->addAppender($a);
-
-		$logger = $hierarchy->getLogger('test');
-
-		$line = __LINE__; $logger->debug('test');
-		$hierarchy->shutdown();
-
-		$li = self::$locationInfo;
-
-		self::assertEquals(get_class($this), $li->getClassName());
-		self::assertEquals(__FILE__, $li->getFileName());
-		self::assertEquals($line, $li->getLineNumber());
-		self::assertEquals(__FUNCTION__, $li->getMethodName());
-	}
-
-	public function testGetThrowableInformation1() {
-		$hierarchy = Logger::getHierarchy();
-		$root = $hierarchy->getRootLogger();
-
-		$a = new LoggingEventTestCaseAppender('A1');
-		$a->setLayout( new LoggingEventTestCaseLayout() );
-		$root->addAppender($a);
-
-		$logger = $hierarchy->getLogger('test');
-		$logger->debug('test');
-		$hierarchy->shutdown();
-
-		$ti = self::$throwableInfo;
-
-		self::assertEquals($ti, null);
-	}
-
-	public function testGetThrowableInformation2() {
-		$hierarchy = Logger::getHierarchy();
-		$root = $hierarchy->getRootLogger();
-
-		$a = new LoggingEventTestCaseAppender('A1');
-		$a->setLayout( new LoggingEventTestCaseLayout() );
-		$root->addAppender($a);
-
-		$ex	= new \Exception('Message1');
-		$logger = $hierarchy->getLogger('test');
-		$logger->debug('test', $ex);
-		$hierarchy->shutdown();
-
-		$ti = self::$throwableInfo;
-
-		self::assertInstanceOf("Apache\\Log4php\\ThrowableInformation", $ti);
-
-		$result	= $ti->getStringRepresentation();
-		self::assertInternalType('array', $result);
-	}
+    public function testConstructWithLoggerName()
+    {
+        $l = Level::getLevelDebug();
+        $e = new LoggingEvent('fqcn', 'TestLogger', $l, 'test');
+        self::assertEquals($e->getLoggerName(), 'TestLogger');
+    }
+
+    public function testConstructWithTimestamp()
+    {
+        $l = Level::getLevelDebug();
+        $timestamp = microtime(true);
+        $e = new LoggingEvent('fqcn', 'TestLogger', $l, 'test', $timestamp);
+        self::assertEquals($e->getTimeStamp(), $timestamp);
+     }
+
+    public function testGetStartTime()
+    {
+        $time = LoggingEvent::getStartTime();
+        self::assertInternalType('float', $time);
+        $time2 = LoggingEvent::getStartTime();
+        self::assertEquals($time, $time2);
+    }
+
+    public function testGetLocationInformation()
+    {
+        $hierarchy = Logger::getHierarchy();
+        $root = $hierarchy->getRootLogger();
+
+        $a = new LoggingEventTestCaseAppender('A1');
+        $a->setLayout(new LoggingEventTestCaseLayout());
+        $root->addAppender($a);
+
+        $logger = $hierarchy->getLogger('test');
+
+        $line = __LINE__; $logger->debug('test');
+        $hierarchy->shutdown();
+
+        $li = self::$locationInfo;
+
+        self::assertEquals(get_class($this), $li->getClassName());
+        self::assertEquals(__FILE__, $li->getFileName());
+        self::assertEquals($line, $li->getLineNumber());
+        self::assertEquals(__FUNCTION__, $li->getMethodName());
+    }
+
+    public function testGetThrowableInformation1()
+    {
+        $hierarchy = Logger::getHierarchy();
+        $root = $hierarchy->getRootLogger();
+
+        $a = new LoggingEventTestCaseAppender('A1');
+        $a->setLayout( new LoggingEventTestCaseLayout() );
+        $root->addAppender($a);
+
+        $logger = $hierarchy->getLogger('test');
+        $logger->debug('test');
+        $hierarchy->shutdown();
+
+        $ti = self::$throwableInfo;
+
+        self::assertEquals($ti, null);
+    }
+
+    public function testGetThrowableInformation2()
+    {
+        $hierarchy = Logger::getHierarchy();
+        $root = $hierarchy->getRootLogger();
+
+        $a = new LoggingEventTestCaseAppender('A1');
+        $a->setLayout( new LoggingEventTestCaseLayout() );
+        $root->addAppender($a);
+
+        $ex	= new \Exception('Message1');
+        $logger = $hierarchy->getLogger('test');
+        $logger->debug('test', $ex);
+        $hierarchy->shutdown();
+
+        $ti = self::$throwableInfo;
+
+        self::assertInstanceOf("Apache\\Log4php\\ThrowableInformation", $ti);
+
+        $result	= $ti->getStringRepresentation();
+        self::assertInternalType('array', $result);
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/MDCTest.php
----------------------------------------------------------------------
diff --git a/tests/src/MDCTest.php b/tests/src/MDCTest.php
index 0d33383..020b7e6 100644
--- a/tests/src/MDCTest.php
+++ b/tests/src/MDCTest.php
@@ -29,91 +29,93 @@ use Apache\Log4php\Layouts\PatternLayout;
 /**
  * @group main
  */
-class MDCTest extends \PHPUnit_Framework_TestCase {
+class MDCTest extends \PHPUnit_Framework_TestCase
+{
+    /** A pattern with 1 key. */
+    private $pattern1 = "%-5p %c: %X{key1} %m";
 
-	/** A pattern with 1 key. */
-	private $pattern1 = "%-5p %c: %X{key1} %m";
+    /** A pattern with 2 keys. */
+    private $pattern2 = "%-5p %c: %X{key1} %X{key2} %m";
 
-	/** A pattern with 2 keys. */
-	private $pattern2 = "%-5p %c: %X{key1} %X{key2} %m";
+    /** A pattern with 3 keys (one is numeric). */
+    private $pattern3 = "%-5p %c: %X{key1} %X{key2} %X{3} %m";
 
-	/** A pattern with 3 keys (one is numeric). */
-	private $pattern3 = "%-5p %c: %X{key1} %X{key2} %X{3} %m";
+    /** A pattern with a non-existant key. */
+    private $pattern4 = "%-5p %c: %X{key_does_not_exist} %m";
 
-	/** A pattern with a non-existant key. */
-	private $pattern4 = "%-5p %c: %X{key_does_not_exist} %m";
+    /** A pattern without a key. */
+    private $pattern5 = "%-5p %c: %X %m";
 
-	/** A pattern without a key. */
-	private $pattern5 = "%-5p %c: %X %m";
-
-	protected function setUp() {
-		MDC::clear();
-	}
-
-	protected function tearDown() {
-		MDC::clear();
-	}
-
-	public function testPatterns() {
-
-		// Create some data to test with
-		MDC::put('key1', 'valueofkey1');
-		MDC::put('key2', 'valueofkey2');
-		MDC::put(3, 'valueofkey3');
-
-		$expected = array(
-			'key1' => 'valueofkey1',
-			'key2' => 'valueofkey2',
-			3 => 'valueofkey3',
-		);
-		$actual = MDC::getMap();
-
-		self::assertSame($expected, $actual);
-
-		$event = TestHelper::getInfoEvent("Test message");
-
-		// Pattern with 1 key
-		$actual = $this->formatEvent($event, $this->pattern1);
-		$expected = "INFO  test: valueofkey1 Test message";
-		self::assertEquals($expected, $actual);
-
-		// Pattern with 2 keys
-		$actual = $this->formatEvent($event, $this->pattern2);
-		$expected = "INFO  test: valueofkey1 valueofkey2 Test message";
-		self::assertEquals($expected, $actual);
-
-		// Pattern with 3 keys (one numeric)
-		$actual = $this->formatEvent($event, $this->pattern3);
-		$expected = "INFO  test: valueofkey1 valueofkey2 valueofkey3 Test message";
-		self::assertEquals($expected, $actual);
+    protected function setUp()
+    {
+        MDC::clear();
+    }
 
-		// Pattern with non-existant key
-		$actual = $this->formatEvent($event, $this->pattern4);
-		$expected = "INFO  test:  Test message";
-		self::assertEquals($expected, $actual);
+    protected function tearDown()
+    {
+        MDC::clear();
+    }
 
-		// Pattern with an empty key
-    	$actual = $this->formatEvent($event, $this->pattern5);
-		$expected = "INFO  test: key1=valueofkey1, key2=valueofkey2, 3=valueofkey3 Test message";
-		self::assertEquals($expected, $actual);
+    public function testPatterns()
+    {
+        // Create some data to test with
+        MDC::put('key1', 'valueofkey1');
+        MDC::put('key2', 'valueofkey2');
+        MDC::put(3, 'valueofkey3');
+
+        $expected = array(
+            'key1' => 'valueofkey1',
+            'key2' => 'valueofkey2',
+            3 => 'valueofkey3',
+        );
+        $actual = MDC::getMap();
+
+        self::assertSame($expected, $actual);
+
+        $event = TestHelper::getInfoEvent("Test message");
+
+        // Pattern with 1 key
+        $actual = $this->formatEvent($event, $this->pattern1);
+        $expected = "INFO  test: valueofkey1 Test message";
+        self::assertEquals($expected, $actual);
+
+        // Pattern with 2 keys
+        $actual = $this->formatEvent($event, $this->pattern2);
+        $expected = "INFO  test: valueofkey1 valueofkey2 Test message";
+        self::assertEquals($expected, $actual);
+
+        // Pattern with 3 keys (one numeric)
+        $actual = $this->formatEvent($event, $this->pattern3);
+        $expected = "INFO  test: valueofkey1 valueofkey2 valueofkey3 Test message";
+        self::assertEquals($expected, $actual);
+
+        // Pattern with non-existant key
+        $actual = $this->formatEvent($event, $this->pattern4);
+        $expected = "INFO  test:  Test message";
+        self::assertEquals($expected, $actual);
+
+        // Pattern with an empty key
+        $actual = $this->formatEvent($event, $this->pattern5);
+        $expected = "INFO  test: key1=valueofkey1, key2=valueofkey2, 3=valueofkey3 Test message";
+        self::assertEquals($expected, $actual);
+
+        // Test key removal
+        MDC::remove('key1');
+        $value = MDC::get('key1');
+        self::assertEquals('', $value);
+
+        // Pattern with 1 key, now removed
+        $actual = $this->formatEvent($event, $this->pattern1);
+        $expected = "INFO  test:  Test message";
+        self::assertEquals($expected, $actual);
+    }
 
-		// Test key removal
-		MDC::remove('key1');
-		$value = MDC::get('key1');
-		self::assertEquals('', $value);
+    private function formatEvent($event, $pattern)
+    {
+        $layout = new PatternLayout();
+        $layout->setConversionPattern($pattern);
+        $layout->activateOptions();
 
-		// Pattern with 1 key, now removed
-		$actual = $this->formatEvent($event, $this->pattern1);
-		$expected = "INFO  test:  Test message";
-		self::assertEquals($expected, $actual);
+        return $layout->format($event);
     }
-
-	private function formatEvent($event, $pattern) {
-		$layout = new PatternLayout();
-		$layout->setConversionPattern($pattern);
-		$layout->activateOptions();
-		return $layout->format($event);
-	}
 }
-
-?>

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/NDCTest.php
----------------------------------------------------------------------
diff --git a/tests/src/NDCTest.php b/tests/src/NDCTest.php
index b65b822..c07d2d6 100644
--- a/tests/src/NDCTest.php
+++ b/tests/src/NDCTest.php
@@ -28,67 +28,65 @@ use Apache\Log4php\NDC;
 /**
  * @group main
  */
-class NDCTest extends \PHPUnit_Framework_TestCase {
-
-	public function testItemHandling()
-	{
-		// Test the empty stack
-		self::assertSame('', NDC::get());
-		self::assertSame('', NDC::peek());
-		self::assertSame(0, NDC::getDepth());
-		self::assertSame('', NDC::pop());
-
-		// Add some data to the stack
-		NDC::push('1');
-		NDC::push('2');
-		NDC::push('3');
-
-		self::assertSame('1 2 3', NDC::get());
-		self::assertSame('3', NDC::peek());
-		self::assertSame(3, NDC::getDepth());
-
-		// Remove last item
-		self::assertSame('3', NDC::pop());
-		self::assertSame('1 2', NDC::get());
-		self::assertSame('2', NDC::peek());
-		self::assertSame(2, NDC::getDepth());
-
-		// Remove all items
-		NDC::remove();
-
-		// Test the empty stack
-		self::assertSame('', NDC::get());
-		self::assertSame('', NDC::peek());
-		self::assertSame(0, NDC::getDepth());
-		self::assertSame('', NDC::pop());
-	}
-
-	public function testMaxDepth()
-	{
-		// Clear stack; add some testing data
-		NDC::clear();
-		NDC::push('1');
-		NDC::push('2');
-		NDC::push('3');
-		NDC::push('4');
-		NDC::push('5');
-		NDC::push('6');
-
-		self::assertSame('1 2 3 4 5 6', NDC::get());
-
-		// Edge case, should not change stack
-		NDC::setMaxDepth(6);
-		self::assertSame('1 2 3 4 5 6', NDC::get());
-		self::assertSame(6, NDC::getDepth());
-
-		NDC::setMaxDepth(3);
-		self::assertSame('1 2 3', NDC::get());
-		self::assertSame(3, NDC::getDepth());
-
-		NDC::setMaxDepth(0);
-		self::assertSame('', NDC::get());
-		self::assertSame(0, NDC::getDepth());
-	}
+class NDCTest extends \PHPUnit_Framework_TestCase
+{
+    public function testItemHandling()
+    {
+        // Test the empty stack
+        self::assertSame('', NDC::get());
+        self::assertSame('', NDC::peek());
+        self::assertSame(0, NDC::getDepth());
+        self::assertSame('', NDC::pop());
+
+        // Add some data to the stack
+        NDC::push('1');
+        NDC::push('2');
+        NDC::push('3');
+
+        self::assertSame('1 2 3', NDC::get());
+        self::assertSame('3', NDC::peek());
+        self::assertSame(3, NDC::getDepth());
+
+        // Remove last item
+        self::assertSame('3', NDC::pop());
+        self::assertSame('1 2', NDC::get());
+        self::assertSame('2', NDC::peek());
+        self::assertSame(2, NDC::getDepth());
+
+        // Remove all items
+        NDC::remove();
+
+        // Test the empty stack
+        self::assertSame('', NDC::get());
+        self::assertSame('', NDC::peek());
+        self::assertSame(0, NDC::getDepth());
+        self::assertSame('', NDC::pop());
+    }
+
+    public function testMaxDepth()
+    {
+        // Clear stack; add some testing data
+        NDC::clear();
+        NDC::push('1');
+        NDC::push('2');
+        NDC::push('3');
+        NDC::push('4');
+        NDC::push('5');
+        NDC::push('6');
+
+        self::assertSame('1 2 3 4 5 6', NDC::get());
+
+        // Edge case, should not change stack
+        NDC::setMaxDepth(6);
+        self::assertSame('1 2 3 4 5 6', NDC::get());
+        self::assertSame(6, NDC::getDepth());
+
+        NDC::setMaxDepth(3);
+        self::assertSame('1 2 3', NDC::get());
+        self::assertSame(3, NDC::getDepth());
+
+        NDC::setMaxDepth(0);
+        self::assertSame('', NDC::get());
+        self::assertSame(0, NDC::getDepth());
+    }
 }
-
-?>


Mime
View raw message