logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject [30/43] Fixed code formatting to conform to PSR-2
Date Thu, 28 Nov 2013 16:04:00 GMT
http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/ConfiguratorTest.php
----------------------------------------------------------------------
diff --git a/tests/src/ConfiguratorTest.php b/tests/src/ConfiguratorTest.php
index b6fb802..d38cc0c 100644
--- a/tests/src/ConfiguratorTest.php
+++ b/tests/src/ConfiguratorTest.php
@@ -30,8 +30,9 @@ use Apache\Log4php\Configuration\DefaultConfigurator;
 
 use Mockery as m;
 
-class CostumDefaultRenderer implements RendererInterface {
-	public function render($o) { }
+class CostumDefaultRenderer implements RendererInterface
+{
+    public function render($o) { }
 }
 
 /**
@@ -39,68 +40,74 @@ class CostumDefaultRenderer implements RendererInterface {
  */
  class ConfiguratorTest extends \PHPUnit_Framework_TestCase
  {
- 	/** Reset configuration after each test. */
- 	public function setUp() {
- 		Logger::resetConfiguration();
- 	}
- 	/** Reset configuration after each test. */
- 	public function tearDown() {
- 		Logger::resetConfiguration();
- 	}
-
- 	/** Check default setup. */
- 	public function testDefaultConfig() {
- 		Logger::configure();
-
- 		$actual = Logger::getCurrentLoggers();
- 		$expected = array();
-		$this->assertSame($expected, $actual);
-
- 		$appenders = Logger::getRootLogger()->getAllAppenders();
- 		$this->assertInternalType('array', $appenders);
- 		$this->assertEquals(count($appenders), 1);
-
- 		$names = array_keys($appenders);
- 		$this->assertSame('default', $names[0]);
-
- 		$appender = array_shift($appenders);
- 		$this->assertInstanceOf('Apache\\Log4php\\Appenders\\EchoAppender', $appender);
- 		$this->assertSame('default', $appender->getName());
-
- 		$layout = $appender->getLayout();
- 		$this->assertInstanceOf('Apache\\Log4php\\Layouts\\SimpleLayout', $layout);
-
- 		$root = Logger::getRootLogger();
- 		$appenders = $root->getAllAppenders();
- 		$this->assertInternalType('array', $appenders);
- 		$this->assertEquals(count($appenders), 1);
-
- 		$actual = $root->getLevel();
- 		$expected = Level::getLevelDebug();
- 		$this->assertEquals($expected, $actual);
- 	}
-
- 	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid configuration param given. Reverting to default configuration.
- 	 */
- 	public function testInputIsInteger() {
- 		Logger::configure(12345);
- 	}
-
- 	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage log4php: Configuration failed. Unsupported configuration file extension: yml
- 	 */
- 	public function testYAMLFile() {
-		Logger::configure(PHPUNIT_CONFIG_DIR . '/config.yml');
- 	}
-
- 	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid configuration provided for appender
- 	 */
- 	public function testAppenderConfigNotArray() {
+     /** Reset configuration after each test. */
+     public function setUp()
+     {
+         Logger::resetConfiguration();
+     }
+     /** Reset configuration after each test. */
+     public function tearDown()
+     {
+         Logger::resetConfiguration();
+     }
+
+     /** Check default setup. */
+     public function testDefaultConfig()
+     {
+         Logger::configure();
+
+         $actual = Logger::getCurrentLoggers();
+         $expected = array();
+        $this->assertSame($expected, $actual);
+
+         $appenders = Logger::getRootLogger()->getAllAppenders();
+         $this->assertInternalType('array', $appenders);
+         $this->assertEquals(count($appenders), 1);
+
+         $names = array_keys($appenders);
+         $this->assertSame('default', $names[0]);
+
+         $appender = array_shift($appenders);
+         $this->assertInstanceOf('Apache\\Log4php\\Appenders\\EchoAppender', $appender);
+         $this->assertSame('default', $appender->getName());
+
+         $layout = $appender->getLayout();
+         $this->assertInstanceOf('Apache\\Log4php\\Layouts\\SimpleLayout', $layout);
+
+         $root = Logger::getRootLogger();
+         $appenders = $root->getAllAppenders();
+         $this->assertInternalType('array', $appenders);
+         $this->assertEquals(count($appenders), 1);
+
+         $actual = $root->getLevel();
+         $expected = Level::getLevelDebug();
+         $this->assertEquals($expected, $actual);
+     }
+
+     /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid configuration param given. Reverting to default configuration.
+      */
+     public function testInputIsInteger()
+     {
+         Logger::configure(12345);
+     }
+
+     /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage log4php: Configuration failed. Unsupported configuration file extension: yml
+      */
+     public function testYAMLFile()
+     {
+        Logger::configure(PHPUNIT_CONFIG_DIR . '/config.yml');
+     }
+
+     /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid configuration provided for appender
+      */
+     public function testAppenderConfigNotArray()
+     {
         $config = array(
             'appenders' => array(
                 'default',
@@ -110,344 +117,362 @@ class CostumDefaultRenderer implements RendererInterface {
         $hierachyMock = m::mock("Apache\\Log4php\\Hierarchy");
         $configurator = new DefaultConfigurator();
         $configurator->configure($hierachyMock, $config);
- 	}
-
-  	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage No class given for appender
- 	 */
- 	public function testNoAppenderClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_no_class.xml');
- 	}
-
-  	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid class [unknownClass] given for appender [foo]. Class does not exist. Skipping appender definition.
- 	 */
- 	public function testNotExistingAppenderClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_not_existing_class.xml');
- 	}
-
-   	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid class [stdClass] given for appender [foo]. Not a valid Appender class. Skipping appender definition.
- 	 */
- 	public function testInvalidAppenderClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_invalid_appender_class.xml');
- 	}
+     }
+
+      /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage No class given for appender
+      */
+     public function testNoAppenderClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_no_class.xml');
+     }
+
+      /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid class [unknownClass] given for appender [foo]. Class does not exist. Skipping appender definition.
+      */
+     public function testNotExistingAppenderClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_not_existing_class.xml');
+     }
+
+       /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid class [stdClass] given for appender [foo]. Not a valid Appender class. Skipping appender definition.
+      */
+     public function testInvalidAppenderClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_invalid_appender_class.xml');
+     }
 
     /**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Nonexistant filter class [Foo] specified on appender [foo]. Skipping filter definition.
- 	 */
- 	public function testNotExistingAppenderFilterClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_not_existing_filter_class.xml');
- 	}
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Nonexistant filter class [Foo] specified on appender [foo]. Skipping filter definition.
+      */
+     public function testNotExistingAppenderFilterClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_not_existing_filter_class.xml');
+     }
 
     /**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Nonexistant option [fooParameter] specified on [Apache\Log4php\Filters\StringMatchFilter]. Skipping.
- 	 */
- 	public function testInvalidAppenderFilterParamter() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_invalid_filter_parameters.xml');
- 	}
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Nonexistant option [fooParameter] specified on [Apache\Log4php\Filters\StringMatchFilter]. Skipping.
+      */
+     public function testInvalidAppenderFilterParamter()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_invalid_filter_parameters.xml');
+     }
 
     /**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid filter class [stdClass] sepcified on appender [foo]. Skipping filter definition.
- 	 */
- 	public function testInvalidAppenderFilterClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_invalid_filter_class.xml');
- 	}
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid filter class [stdClass] sepcified on appender [foo]. Skipping filter definition.
+      */
+     public function testInvalidAppenderFilterClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_invalid_filter_class.xml');
+     }
 
     /**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Nonexistant layout class [Foo] specified for appender [foo]. Reverting to default layout.
- 	 */
- 	public function testNotExistingAppenderLayoutClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_not_existing_layout_class.xml');
- 	}
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Nonexistant layout class [Foo] specified for appender [foo]. Reverting to default layout.
+      */
+     public function testNotExistingAppenderLayoutClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_not_existing_layout_class.xml');
+     }
 
     /**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid layout class [stdClass] sepcified for appender [foo]. Reverting to default layout.
- 	 */
- 	public function testInvalidAppenderLayoutClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_invalid_layout_class.xml');
- 	}
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid layout class [stdClass] sepcified for appender [foo]. Reverting to default layout.
+      */
+     public function testInvalidAppenderLayoutClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_invalid_layout_class.xml');
+     }
 
     /**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Layout class not specified for appender [foo]. Reverting to default layout.
- 	 */
- 	public function testNoAppenderLayoutClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_no_layout_class.xml');
- 	}
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Layout class not specified for appender [foo]. Reverting to default layout.
+      */
+     public function testNoAppenderLayoutClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/appenders/config_no_layout_class.xml');
+     }
 
     /**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Failed adding renderer. Rendering class [stdClass] does not implement the RendererInterface interface.
- 	 */
- 	public function testInvalidRenderingClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/renderers/config_invalid_rendering_class.xml');
- 	}
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Failed adding renderer. Rendering class [stdClass] does not implement the RendererInterface interface.
+      */
+     public function testInvalidRenderingClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/renderers/config_invalid_rendering_class.xml');
+     }
 
     /**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Rendering class not specified. Skipping renderer definition.
- 	 */
- 	public function testNoRenderingClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/renderers/config_no_rendering_class.xml');
- 	}
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Rendering class not specified. Skipping renderer definition.
+      */
+     public function testNoRenderingClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/renderers/config_no_rendering_class.xml');
+     }
 
     /**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Rendered class not specified. Skipping renderer definition.
- 	 */
- 	public function testNoRenderedClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/renderers/config_no_rendered_class.xml');
- 	}
-
- 	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Failed adding renderer. Rendering class [DoesNotExistRenderer] not found.
- 	 */
- 	public function testNotExistingRenderingClassSet() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/renderers/config_not_existing_rendering_class.xml');
- 	}
-
- 	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid additivity value [4711] specified for logger [myLogger].
- 	 */
- 	public function testInvalidLoggerAddivity() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/loggers/config_invalid_additivity.xml');
- 	}
-
- 	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Nonexistnant appender [unknownAppender] linked to logger [myLogger].
- 	 */
- 	public function testNotExistingLoggerAppendersClass() {
- 		Logger::configure(PHPUNIT_CONFIG_DIR . '/loggers/config_not_existing_appenders.xml');
- 	}
-
- 	/**
- 	 * Test that an error is reported when config file is not found.
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage log4php: Configuration failed. File not found
- 	 */
- 	public function testNonexistantFile() {
- 		Logger::configure('hopefully/this/path/doesnt/exist/config.xml');
-
- 	}
-
- 	/** Test correct fallback to the default configuration. */
- 	public function testNonexistantFileFallback() {
- 		@Logger::configure('hopefully/this/path/doesnt/exist/config.xml');
- 		$this->testDefaultConfig();
- 	}
-
- 	public function testAppendersWithLayout() {
- 		$config = Logger::configure(array(
- 			'rootLogger' => array(
- 				'appenders' => array('app1', 'app2')
- 			),
- 			'loggers' => array(
- 				'myLogger' => array(
- 					'appenders' => array('app1'),
- 					'additivity'=> true
- 				)
- 			),
- 			'renderers' => array(
- 				array('renderedClass' => 'stdClass', 'renderingClass' => 'DefaultRenderer')
- 			),
- 			'appenders' => array(
- 				'app1' => array(
- 					'class' => 'EchoAppender',
- 					'layout' => array(
- 						'class' => 'SimpleLayout'
- 					),
- 					'params' => array(
- 						'htmlLineBreaks' => false
- 					)
- 				),
-		 		'app2' => array(
-		 		 	'class' => 'EchoAppender',
-		 		 	'layout' => array(
-		 		 		'class' => 'PatternLayout',
-		 		 		'params' => array(
-		 		 			'conversionPattern' => 'message: %m%n'
-		 		 		)
-		 			),
-		 			'filters' => array(
-		 				array(
-		 					'class'	=> 'StringMatchFilter',
-		 					'params'=> array(
-		 						'stringToMatch'	=> 'foo',
-		 						'acceptOnMatch'	=> false
-		 					)
-		 				)
-		 			)
-		 		),
- 			)
- 		));
-
- 		ob_start();
- 		Logger::getRootLogger()->info('info');
- 		$actual = ob_get_contents();
- 		ob_end_clean();
-
- 		$expected = "INFO - info" . PHP_EOL . "message: info" . PHP_EOL;
-  		$this->assertSame($expected, $actual);
- 	}
-
-  	public function testThreshold()
- 	{
- 		Logger::configure(array(
- 			'threshold' => 'WARN',
- 			'rootLogger' => array(
- 				'appenders' => array('default')
- 			),
- 			'appenders' => array(
- 				'default' => array(
- 					'class' => 'EchoAppender',
- 				),
- 			)
- 		));
-
- 		$actual = Logger::getHierarchy()->getThreshold();
- 		$expected = Level::getLevelWarn();
-
- 		self::assertSame($expected, $actual);
- 	}
-
- 	/**
- 	* @expectedException PHPUnit_Framework_Error
- 	* @expectedExceptionMessage Invalid threshold value [FOO] specified. Ignoring threshold definition.
- 	*/
-  	public function testInvalidThreshold()
- 	{
- 		Logger::configure(array(
- 			'threshold' => 'FOO',
- 			'rootLogger' => array(
- 				'appenders' => array('default')
- 			),
- 			'appenders' => array(
- 				'default' => array(
- 					'class' => 'EchoAppender',
- 				),
- 			)
- 		));
- 	}
-
- 	public function testAppenderThreshold()
- 	{
- 		Logger::configure(array(
- 			'rootLogger' => array(
- 				'appenders' => array('default')
- 			),
- 			'appenders' => array(
- 				'default' => array(
- 					'class' => 'EchoAppender',
- 					'threshold' => 'INFO'
- 				),
- 			)
- 		));
-
- 		$actual = Logger::getRootLogger()->getAppender('default')->getThreshold();
- 		$expected = Level::getLevelInfo();
-
- 		self::assertSame($expected, $actual);
- 	}
-
- 	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid threshold value [FOO] specified for appender [default]. Ignoring threshold definition.
- 	 */
- 	public function testAppenderInvalidThreshold()
- 	{
- 		Logger::configure(array(
- 			'rootLogger' => array(
- 				'appenders' => array('default')
- 			),
- 			'appenders' => array(
- 				'default' => array(
- 					'class' => 'EchoAppender',
- 					'threshold' => 'FOO'
- 				),
- 			)
- 		));
- 	}
-
- 	public function testLoggerThreshold()
- 	{
- 		Logger::configure(array(
- 			'rootLogger' => array(
- 				'appenders' => array('default'),
- 				'level' => 'ERROR'
- 			),
- 			'loggers' => array(
- 				'default' => array(
- 					'appenders' => array('default'),
- 		 			'level' => 'WARN'
- 				)
- 			),
- 			'appenders' => array(
- 				'default' => array(
- 					'class' => 'EchoAppender',
- 				),
- 			)
- 		));
-
- 		// Check root logger
- 		$actual = Logger::getRootLogger()->getLevel();
- 		$expected = Level::getLevelError();
- 		self::assertSame($expected, $actual);
-
- 		// Check default logger
- 		$actual = Logger::getLogger('default')->getLevel();
- 		$expected = Level::getLevelWarn();
- 		self::assertSame($expected, $actual);
- 	}
-
- 	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid level value [FOO] specified for logger [default]. Ignoring level definition.
- 	 */
- 	public function testInvalidLoggerThreshold()
- 	{
- 		Logger::configure(array(
- 			'loggers' => array(
- 				'default' => array(
- 					'appenders' => array('default'),
- 		 			'level' => 'FOO'
- 				)
- 			),
- 			'appenders' => array(
- 				'default' => array(
- 					'class' => 'EchoAppender',
- 				),
- 			)
- 		));
- 	}
-
- 	/**
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage Invalid level value [FOO] specified for logger [root]. Ignoring level definition.
- 	 */
-  	public function testInvalidRootLoggerThreshold()
- 	{
- 		Logger::configure(array(
- 			'rootLogger' => array(
- 				'appenders' => array('default'),
- 				'level' => 'FOO'
- 			),
- 			'appenders' => array(
- 				'default' => array(
- 					'class' => 'EchoAppender',
- 				),
- 			)
- 		));
- 	}
- }
\ No newline at end of file
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Rendered class not specified. Skipping renderer definition.
+      */
+     public function testNoRenderedClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/renderers/config_no_rendered_class.xml');
+     }
+
+     /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Failed adding renderer. Rendering class [DoesNotExistRenderer] not found.
+      */
+     public function testNotExistingRenderingClassSet()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/renderers/config_not_existing_rendering_class.xml');
+     }
+
+     /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid additivity value [4711] specified for logger [myLogger].
+      */
+     public function testInvalidLoggerAddivity()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/loggers/config_invalid_additivity.xml');
+     }
+
+     /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Nonexistnant appender [unknownAppender] linked to logger [myLogger].
+      */
+     public function testNotExistingLoggerAppendersClass()
+     {
+         Logger::configure(PHPUNIT_CONFIG_DIR . '/loggers/config_not_existing_appenders.xml');
+     }
+
+     /**
+      * Test that an error is reported when config file is not found.
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage log4php: Configuration failed. File not found
+      */
+     public function testNonexistantFile()
+     {
+         Logger::configure('hopefully/this/path/doesnt/exist/config.xml');
+
+     }
+
+     /** Test correct fallback to the default configuration. */
+     public function testNonexistantFileFallback()
+     {
+         @Logger::configure('hopefully/this/path/doesnt/exist/config.xml');
+         $this->testDefaultConfig();
+     }
+
+     public function testAppendersWithLayout()
+     {
+         $config = Logger::configure(array(
+             'rootLogger' => array(
+                 'appenders' => array('app1', 'app2')
+             ),
+             'loggers' => array(
+                 'myLogger' => array(
+                     'appenders' => array('app1'),
+                     'additivity'=> true
+                 )
+             ),
+             'renderers' => array(
+                 array('renderedClass' => 'stdClass', 'renderingClass' => 'DefaultRenderer')
+             ),
+             'appenders' => array(
+                 'app1' => array(
+                     'class' => 'EchoAppender',
+                     'layout' => array(
+                         'class' => 'SimpleLayout'
+                     ),
+                     'params' => array(
+                         'htmlLineBreaks' => false
+                     )
+                 ),
+                 'app2' => array(
+                      'class' => 'EchoAppender',
+                      'layout' => array(
+                          'class' => 'PatternLayout',
+                          'params' => array(
+                              'conversionPattern' => 'message: %m%n'
+                          )
+                     ),
+                     'filters' => array(
+                         array(
+                             'class'	=> 'StringMatchFilter',
+                             'params'=> array(
+                                 'stringToMatch'	=> 'foo',
+                                 'acceptOnMatch'	=> false
+                             )
+                         )
+                     )
+                 ),
+             )
+         ));
+
+         ob_start();
+         Logger::getRootLogger()->info('info');
+         $actual = ob_get_contents();
+         ob_end_clean();
+
+         $expected = "INFO - info" . PHP_EOL . "message: info" . PHP_EOL;
+          $this->assertSame($expected, $actual);
+     }
+
+      public function testThreshold()
+     {
+         Logger::configure(array(
+             'threshold' => 'WARN',
+             'rootLogger' => array(
+                 'appenders' => array('default')
+             ),
+             'appenders' => array(
+                 'default' => array(
+                     'class' => 'EchoAppender',
+                 ),
+             )
+         ));
+
+         $actual = Logger::getHierarchy()->getThreshold();
+         $expected = Level::getLevelWarn();
+
+         self::assertSame($expected, $actual);
+     }
+
+     /**
+     * @expectedException PHPUnit_Framework_Error
+     * @expectedExceptionMessage Invalid threshold value [FOO] specified. Ignoring threshold definition.
+     */
+      public function testInvalidThreshold()
+     {
+         Logger::configure(array(
+             'threshold' => 'FOO',
+             'rootLogger' => array(
+                 'appenders' => array('default')
+             ),
+             'appenders' => array(
+                 'default' => array(
+                     'class' => 'EchoAppender',
+                 ),
+             )
+         ));
+     }
+
+     public function testAppenderThreshold()
+     {
+         Logger::configure(array(
+             'rootLogger' => array(
+                 'appenders' => array('default')
+             ),
+             'appenders' => array(
+                 'default' => array(
+                     'class' => 'EchoAppender',
+                     'threshold' => 'INFO'
+                 ),
+             )
+         ));
+
+         $actual = Logger::getRootLogger()->getAppender('default')->getThreshold();
+         $expected = Level::getLevelInfo();
+
+         self::assertSame($expected, $actual);
+     }
+
+     /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid threshold value [FOO] specified for appender [default]. Ignoring threshold definition.
+      */
+     public function testAppenderInvalidThreshold()
+     {
+         Logger::configure(array(
+             'rootLogger' => array(
+                 'appenders' => array('default')
+             ),
+             'appenders' => array(
+                 'default' => array(
+                     'class' => 'EchoAppender',
+                     'threshold' => 'FOO'
+                 ),
+             )
+         ));
+     }
+
+     public function testLoggerThreshold()
+     {
+         Logger::configure(array(
+             'rootLogger' => array(
+                 'appenders' => array('default'),
+                 'level' => 'ERROR'
+             ),
+             'loggers' => array(
+                 'default' => array(
+                     'appenders' => array('default'),
+                      'level' => 'WARN'
+                 )
+             ),
+             'appenders' => array(
+                 'default' => array(
+                     'class' => 'EchoAppender',
+                 ),
+             )
+         ));
+
+         // Check root logger
+         $actual = Logger::getRootLogger()->getLevel();
+         $expected = Level::getLevelError();
+         self::assertSame($expected, $actual);
+
+         // Check default logger
+         $actual = Logger::getLogger('default')->getLevel();
+         $expected = Level::getLevelWarn();
+         self::assertSame($expected, $actual);
+     }
+
+     /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid level value [FOO] specified for logger [default]. Ignoring level definition.
+      */
+     public function testInvalidLoggerThreshold()
+     {
+         Logger::configure(array(
+             'loggers' => array(
+                 'default' => array(
+                     'appenders' => array('default'),
+                      'level' => 'FOO'
+                 )
+             ),
+             'appenders' => array(
+                 'default' => array(
+                     'class' => 'EchoAppender',
+                 ),
+             )
+         ));
+     }
+
+     /**
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage Invalid level value [FOO] specified for logger [root]. Ignoring level definition.
+      */
+      public function testInvalidRootLoggerThreshold()
+     {
+         Logger::configure(array(
+             'rootLogger' => array(
+                 'appenders' => array('default'),
+                 'level' => 'FOO'
+             ),
+             'appenders' => array(
+                 'default' => array(
+                     'class' => 'EchoAppender',
+                 ),
+             )
+         ));
+     }
+ }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Configurators/INIAdapterTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Configurators/INIAdapterTest.php b/tests/src/Configurators/INIAdapterTest.php
index 92d2380..5b950e4 100644
--- a/tests/src/Configurators/INIAdapterTest.php
+++ b/tests/src/Configurators/INIAdapterTest.php
@@ -30,148 +30,152 @@ use Apache\Log4php\LoggerException;
 /**
  * @group configuration
  */
-class INIAdapterTest extends \PHPUnit_Framework_TestCase {
-
-	/** Expected output of parsing config1.ini. */
-	private $expected1 = array(
-		'threshold' => 'debug',
-		'rootLogger' => array(
-			'level' => 'DEBUG',
-			'appenders' => array('default'),
-		),
-		'appenders' => array(
-			'default' => array(
-				'class' => 'EchoAppender',
-				'layout' => array(
-					'class' => 'LoggerLayoutTTCC',
-				),
-			),
-			'file' => array(
-				'class' => 'DailyFileAppender',
-				'layout' => array(
-					'class' => 'PatternLayout',
-					'params' => array(
-						'conversionPattern' => '%d{ISO8601} [%p] %c: %m (at %F line %L)%n',
-					),
-				),
-				'params' => array(
-					'datePattern' => 'Ymd',
-					'file' => 'target/examples/daily_%s.log',
-				),
-				'threshold' => 'warn'
-			),
-		),
-		'loggers' => array(
-			'foo' => array(
-				'level' => 'warn',
-				'appenders' => array('default'),
-			),
-			'foo.bar' => array(
-				'level' => 'debug',
-				'appenders' => array('file'),
-				'additivity' => 'true',
-			),
-			'foo.bar.baz' => array(
-				'level' => 'trace',
-				'appenders' => array('default', 'file'),
-				'additivity' => 'false',
-			),
-		),
-		'renderers' => array(
-			array(
-				'renderedClass' => 'Fruit',
-				'renderingClass' => 'FruitRenderer',
-			),
-			array(
-				'renderedClass' => 'Beer',
-				'renderingClass' => 'BeerRenderer',
-			),
-		),
-	);
-
-	public function testConfig() {
-		$url = PHPUNIT_CONFIG_DIR . '/adapters/ini/config_valid.ini';
-		$adapter = new IniAdapter();
-		$actual = $adapter->convert($url);
-
-		$this->assertSame($this->expected1, $actual);
-	}
-
-	/**
-	 * Test exception is thrown when file cannot be found.
- 	 * @expectedException Apache\Log4php\LoggerException
- 	 * @expectedExceptionMessage File [you/will/never/find/me.ini] does not exist.
-	 */
-	public function testNonExistantFileException() {
-		$adapter = new IniAdapter();
-		$adapter->convert('you/will/never/find/me.ini');
-	}
-
-	/**
-	 * Test exception is thrown when file is not a valid ini file.
-	 * @expectedException Apache\Log4php\LoggerException
-	 * @expectedExceptionMessage Error parsing configuration file
-	 */
-	public function testInvalidFileException() {
-		$url =  PHPUNIT_CONFIG_DIR . '/adapters/ini/config_invalid_syntax.ini';
-		$adapter = new IniAdapter();
-		$adapter->convert($url);
-	}
-
-	/**
-	 * Test a warning is triggered when configurator doesn't understand a line.
-	 * @expectedException PHPUnit_Framework_Error
-	 * @expectedExceptionMessage log4php: Don't know how to parse the following line: "log4php.appender.default.layout.param.bla = LoggerLayoutTTCC". Skipping.
-	 */
-	public function testInvalidLineWarning1() {
-		$url =  PHPUNIT_CONFIG_DIR . '/adapters/ini/config_invalid_appender_declaration_1.ini';
-		$adapter = new IniAdapter();
-		$adapter->convert($url);
-	}
-
-	/**
-	 * Test a warning is triggered when configurator doesn't understand a line.
-	 * @expectedException PHPUnit_Framework_Error
-	 * @expectedExceptionMessage log4php: Don't know how to parse the following line: "log4php.appender.default.not-layout.param = LoggerLayoutTTCC". Skipping.
-	 */
-	public function testInvalidLineWarning2() {
-		$url =  PHPUNIT_CONFIG_DIR . '/adapters/ini/config_invalid_appender_declaration_2.ini';
-		$adapter = new IniAdapter();
-		$adapter->convert($url);
-	}
-
-	/**
-	 * Check that various boolean equivalents from ini file convert properly
-	 * to boolean.
-	 */
-	public function testBooleanValues() {
-		$values = parse_ini_file(PHPUNIT_CONFIG_DIR . '/adapters/ini/values.ini');
-
-		$actual = OptionConverter::toBooleanEx($values['unquoted_true']);
-		self::assertTrue($actual);
-
-		$actual = OptionConverter::toBooleanEx($values['unquoted_yes']);
-		self::assertTrue($actual);
-
-		$actual = OptionConverter::toBooleanEx($values['unquoted_false']);
-		self::assertFalse($actual);
-
-		$actual = OptionConverter::toBooleanEx($values['unquoted_no']);
-		self::assertFalse($actual);
-
-		$actual = OptionConverter::toBooleanEx($values['quoted_true']);
-		self::assertTrue($actual);
-
-		$actual = OptionConverter::toBooleanEx($values['quoted_false']);
-		self::assertFalse($actual);
-
-		$actual = OptionConverter::toBooleanEx($values['unquoted_one']);
-		self::assertTrue($actual);
-
-		$actual = OptionConverter::toBooleanEx($values['unquoted_zero']);
-		self::assertFalse($actual);
-	}
+class INIAdapterTest extends \PHPUnit_Framework_TestCase
+{
+    /** Expected output of parsing config1.ini. */
+    private $expected1 = array(
+        'threshold' => 'debug',
+        'rootLogger' => array(
+            'level' => 'DEBUG',
+            'appenders' => array('default'),
+        ),
+        'appenders' => array(
+            'default' => array(
+                'class' => 'EchoAppender',
+                'layout' => array(
+                    'class' => 'LoggerLayoutTTCC',
+                ),
+            ),
+            'file' => array(
+                'class' => 'DailyFileAppender',
+                'layout' => array(
+                    'class' => 'PatternLayout',
+                    'params' => array(
+                        'conversionPattern' => '%d{ISO8601} [%p] %c: %m (at %F line %L)%n',
+                    ),
+                ),
+                'params' => array(
+                    'datePattern' => 'Ymd',
+                    'file' => 'target/examples/daily_%s.log',
+                ),
+                'threshold' => 'warn'
+            ),
+        ),
+        'loggers' => array(
+            'foo' => array(
+                'level' => 'warn',
+                'appenders' => array('default'),
+            ),
+            'foo.bar' => array(
+                'level' => 'debug',
+                'appenders' => array('file'),
+                'additivity' => 'true',
+            ),
+            'foo.bar.baz' => array(
+                'level' => 'trace',
+                'appenders' => array('default', 'file'),
+                'additivity' => 'false',
+            ),
+        ),
+        'renderers' => array(
+            array(
+                'renderedClass' => 'Fruit',
+                'renderingClass' => 'FruitRenderer',
+            ),
+            array(
+                'renderedClass' => 'Beer',
+                'renderingClass' => 'BeerRenderer',
+            ),
+        ),
+    );
+
+    public function testConfig()
+    {
+        $url = PHPUNIT_CONFIG_DIR . '/adapters/ini/config_valid.ini';
+        $adapter = new IniAdapter();
+        $actual = $adapter->convert($url);
+
+        $this->assertSame($this->expected1, $actual);
+    }
+
+    /**
+     * Test exception is thrown when file cannot be found.
+      * @expectedException Apache\Log4php\LoggerException
+      * @expectedExceptionMessage File [you/will/never/find/me.ini] does not exist.
+     */
+    public function testNonExistantFileException()
+    {
+        $adapter = new IniAdapter();
+        $adapter->convert('you/will/never/find/me.ini');
+    }
+
+    /**
+     * Test exception is thrown when file is not a valid ini file.
+     * @expectedException Apache\Log4php\LoggerException
+     * @expectedExceptionMessage Error parsing configuration file
+     */
+    public function testInvalidFileException()
+    {
+        $url =  PHPUNIT_CONFIG_DIR . '/adapters/ini/config_invalid_syntax.ini';
+        $adapter = new IniAdapter();
+        $adapter->convert($url);
+    }
+
+    /**
+     * Test a warning is triggered when configurator doesn't understand a line.
+     * @expectedException PHPUnit_Framework_Error
+     * @expectedExceptionMessage log4php: Don't know how to parse the following line: "log4php.appender.default.layout.param.bla = LoggerLayoutTTCC". Skipping.
+     */
+    public function testInvalidLineWarning1()
+    {
+        $url =  PHPUNIT_CONFIG_DIR . '/adapters/ini/config_invalid_appender_declaration_1.ini';
+        $adapter = new IniAdapter();
+        $adapter->convert($url);
+    }
+
+    /**
+     * Test a warning is triggered when configurator doesn't understand a line.
+     * @expectedException PHPUnit_Framework_Error
+     * @expectedExceptionMessage log4php: Don't know how to parse the following line: "log4php.appender.default.not-layout.param = LoggerLayoutTTCC". Skipping.
+     */
+    public function testInvalidLineWarning2()
+    {
+        $url =  PHPUNIT_CONFIG_DIR . '/adapters/ini/config_invalid_appender_declaration_2.ini';
+        $adapter = new IniAdapter();
+        $adapter->convert($url);
+    }
+
+    /**
+     * Check that various boolean equivalents from ini file convert properly
+     * to boolean.
+     */
+    public function testBooleanValues()
+    {
+        $values = parse_ini_file(PHPUNIT_CONFIG_DIR . '/adapters/ini/values.ini');
+
+        $actual = OptionConverter::toBooleanEx($values['unquoted_true']);
+        self::assertTrue($actual);
+
+        $actual = OptionConverter::toBooleanEx($values['unquoted_yes']);
+        self::assertTrue($actual);
+
+        $actual = OptionConverter::toBooleanEx($values['unquoted_false']);
+        self::assertFalse($actual);
+
+        $actual = OptionConverter::toBooleanEx($values['unquoted_no']);
+        self::assertFalse($actual);
+
+        $actual = OptionConverter::toBooleanEx($values['quoted_true']);
+        self::assertTrue($actual);
+
+        $actual = OptionConverter::toBooleanEx($values['quoted_false']);
+        self::assertFalse($actual);
+
+        $actual = OptionConverter::toBooleanEx($values['unquoted_one']);
+        self::assertTrue($actual);
+
+        $actual = OptionConverter::toBooleanEx($values['unquoted_zero']);
+        self::assertFalse($actual);
+    }
 
 }
-
-?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Configurators/PHPAdapterTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Configurators/PHPAdapterTest.php b/tests/src/Configurators/PHPAdapterTest.php
index 2b79826..dbcf2c2 100644
--- a/tests/src/Configurators/PHPAdapterTest.php
+++ b/tests/src/Configurators/PHPAdapterTest.php
@@ -29,73 +29,76 @@ use Apache\Log4php\Configuration\Adapters\PhpAdapter;
 /**
  * @group configuration
  */
-class PHPAdapterTest extends \PHPUnit_Framework_TestCase {
+class PHPAdapterTest extends \PHPUnit_Framework_TestCase
+{
+    private $expected1 = array(
+        'rootLogger' => array(
+            'level' => 'info',
+            'appenders' => array('default')
+        ),
+        'appenders' => array(
+            'default' => array(
+                'class' => 'EchoAppender',
+                'layout' => array(
+                    'class' => 'SimpleLayout'
+                 )
+            )
+        )
+    );
 
-	private $expected1 = array(
-		'rootLogger' => array(
-			'level' => 'info',
-			'appenders' => array('default')
-		),
-		'appenders' => array(
-			'default' => array(
-				'class' => 'EchoAppender',
-				'layout' => array(
-					'class' => 'SimpleLayout'
-				 )
-			)
-		)
-	);
+    public function testConfig()
+    {
+        $url = PHPUNIT_CONFIG_DIR . '/adapters/php/config_valid.php';
+        $adapter = new PhpAdapter();
+        $actual = $adapter->convert($url);
 
-	public function testConfig() {
-		$url = PHPUNIT_CONFIG_DIR . '/adapters/php/config_valid.php';
-		$adapter = new PhpAdapter();
-		$actual = $adapter->convert($url);
+        $this->assertSame($this->expected1, $actual);
+    }
 
-		$this->assertSame($this->expected1, $actual);
-	}
+    /**
+     * Test exception is thrown when file cannot be found.
+      * @expectedException Apache\Log4php\LoggerException
+      * @expectedExceptionMessage File [you/will/never/find/me.conf] does not exist.
+     */
+    public function testNonExistantFileWarning()
+    {
+        $adapter = new PhpAdapter();
+        $adapter->convert('you/will/never/find/me.conf');
+    }
 
-	/**
-	 * Test exception is thrown when file cannot be found.
- 	 * @expectedException Apache\Log4php\LoggerException
- 	 * @expectedExceptionMessage File [you/will/never/find/me.conf] does not exist.
-	 */
-	public function testNonExistantFileWarning() {
-		$adapter = new PhpAdapter();
-		$adapter->convert('you/will/never/find/me.conf');
-	}
+    /**
+     * Test exception is thrown when file is not valid.
+     * @expectedException Apache\Log4php\LoggerException
+     * @expectedExceptionMessage Error parsing configuration: syntax error
+     */
+    public function testInvalidFileWarning()
+    {
+        $url = PHPUNIT_CONFIG_DIR . '/adapters/php/config_invalid_syntax.php';
+        $adapter = new PhpAdapter();
+        $adapter->convert($url);
+    }
 
-	/**
-	 * Test exception is thrown when file is not valid.
-	 * @expectedException Apache\Log4php\LoggerException
-	 * @expectedExceptionMessage Error parsing configuration: syntax error
-	 */
-	public function testInvalidFileWarning() {
-		$url = PHPUNIT_CONFIG_DIR . '/adapters/php/config_invalid_syntax.php';
-		$adapter = new PhpAdapter();
-		$adapter->convert($url);
-	}
+    /**
+     * Test exception is thrown when the configuration is empty.
+     * @expectedException Apache\Log4php\LoggerException
+     * @expectedExceptionMessage Invalid configuration: empty configuration array.
+     */
+    public function testEmptyConfigWarning()
+    {
+        $url = PHPUNIT_CONFIG_DIR . '/adapters/php/config_empty.php';
+        $adapter = new PhpAdapter();
+        $adapter->convert($url);
+    }
 
-	/**
-	 * Test exception is thrown when the configuration is empty.
-	 * @expectedException Apache\Log4php\LoggerException
-	 * @expectedExceptionMessage Invalid configuration: empty configuration array.
-	 */
-	public function testEmptyConfigWarning() {
-		$url = PHPUNIT_CONFIG_DIR . '/adapters/php/config_empty.php';
-		$adapter = new PhpAdapter();
-		$adapter->convert($url);
-	}
-
-	/**
-	 * Test exception is thrown when the configuration does not contain an array.
-	 * @expectedException Apache\Log4php\LoggerException
-	 * @expectedExceptionMessage Invalid configuration: not an array.
-	 */
-	public function testInvalidConfigWarning() {
-		$url = PHPUNIT_CONFIG_DIR . '/adapters/php/config_not_an_array.php';
-		$adapter = new PhpAdapter();
-		$adapter->convert($url);
-	}
+    /**
+     * Test exception is thrown when the configuration does not contain an array.
+     * @expectedException Apache\Log4php\LoggerException
+     * @expectedExceptionMessage Invalid configuration: not an array.
+     */
+    public function testInvalidConfigWarning()
+    {
+        $url = PHPUNIT_CONFIG_DIR . '/adapters/php/config_not_an_array.php';
+        $adapter = new PhpAdapter();
+        $adapter->convert($url);
+    }
 }
-
-?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Configurators/XMLAdapterTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Configurators/XMLAdapterTest.php b/tests/src/Configurators/XMLAdapterTest.php
index 3c4dbe2..6adee8f 100644
--- a/tests/src/Configurators/XMLAdapterTest.php
+++ b/tests/src/Configurators/XMLAdapterTest.php
@@ -30,149 +30,154 @@ use Apache\Log4php\Configuration\Adapters\XmlAdapter;
 /**
  * @group configuration
  */
-class XMLAdapterTest extends \PHPUnit_Framework_TestCase {
-
-	/** Expected output of parsing config1.xml.*/
-	private $expected1 = array(
-		'appenders' => array(
-			'default' => array(
-				'class' => 'EchoAppender',
-				'layout' => array(
-					'class' => 'LoggerLayoutTTCC',
-				),
-				'filters' => array(
-					array(
-						'class' => 'LevelRangeFilter',
-						'params' => array(
-							'levelMin' => 'ERROR',
-							'levelMax' => 'FATAL',
-							'acceptOnMatch' => 'false',
-						),
-					),
-					array(
-						'class' => 'DenyAllFilter',
-					),
-				),
-			),
-			'file' => array(
-				'class' => 'DailyFileAppender',
-				'layout' => array(
-					'class' => 'PatternLayout',
-					'params' => array(
-						'conversionPattern' => '%d{ISO8601} [%p] %c: %m (at %F line %L)%n',
-					),
-				),
-				'params' => array(
-					'datePattern' => 'Ymd',
-					'file' => 'target/examples/daily_%s.log',
-				),
-				'threshold' => 'warn'
-			),
-		),
-		'loggers' => array(
-			'foo.bar.baz' => array(
-				'level' => 'trace',
-				'additivity' => 'false',
-				'appenders' => array('default'),
-			),
-			'foo.bar' => array(
-				'level' => 'debug',
-				'additivity' => 'true',
-				'appenders' => array('file'),
-			),
-			'foo' => array(
-				'level' => 'warn',
-				'appenders' => array('default', 'file'),
-			),
-		),
-		'renderers' => array(
-			array(
-				'renderedClass' => 'Fruit',
-				'renderingClass' => 'FruitRenderer',
-			),
-			array(
-				'renderedClass' => 'Beer',
-				'renderingClass' => 'BeerRenderer',
-			),
-		),
-		'threshold' => 'debug',
-		'rootLogger' => array(
-			'level' => 'DEBUG',
-			'appenders' => array('default'),
-		),
-	);
-
-	public function setUp() {
-		Logger::resetConfiguration();
-	}
-
-	public function tearDown() {
-		Logger::resetConfiguration();
-	}
-
-	public function testConversion() {
-		$url =  PHPUNIT_CONFIG_DIR . '/adapters/xml/config_valid.xml';
-		$adapter = new XmlAdapter();
-		$actual = $adapter->convert($url);
-		$this->assertEquals($this->expected1, $actual);
-	}
-
-	public function testConversion2() {
-		$url =  PHPUNIT_CONFIG_DIR . '/adapters/xml/config_valid_underscore.xml';
-		$adapter = new XmlAdapter();
-		$actual = $adapter->convert($url);
-
-		$this->assertEquals($this->expected1, $actual);
-	}
-
-	/**
-	 * Test exception is thrown when file cannot be found.
- 	 * @expectedException Apache\Log4php\LoggerException
- 	 * @expectedExceptionMessage File [you/will/never/find/me.conf] does not exist.
-	 */
-	public function testNonExistantFile() {
-		$adapter = new XmlAdapter();
-		$adapter->convert('you/will/never/find/me.conf');
-	}
-
-	/**
-	 * Test exception is thrown when file contains invalid XML.
-	 * @expectedException Apache\Log4php\LoggerException
-	 * @expectedExceptionMessage Error loading configuration file: Premature end of data in tag configuration line
-	 */
-	public function testInvalidXMLFile() {
-		$url =  PHPUNIT_CONFIG_DIR . '/adapters/xml/config_invalid_syntax.xml';
-		$adapter = new XmlAdapter();
-		$adapter->convert($url);
-	}
-
-	/**
-	 * Test that a warning is triggered when two loggers with the same name
-	 * are defined.
- 	 * @expectedException PHPUnit_Framework_Error
- 	 * @expectedExceptionMessage log4php: Duplicate logger definition [foo]. Overwriting
-	 */
-	public function testDuplicateLoggerWarning() {
-		$url =  PHPUNIT_CONFIG_DIR . '/adapters/xml/config_duplicate_logger.xml';
-		$adapter = new XmlAdapter();
-		$adapter->convert($url);
-	}
-
-
-	/**
-	 * Test that when two loggers with the same name are defined, the second
-	 * one will overwrite the first.
-	 */
-	public function testDuplicateLoggerConfig() {
-		$url =  PHPUNIT_CONFIG_DIR . '/adapters/xml/config_duplicate_logger.xml';
-		$adapter = new XmlAdapter();
-
-		// Supress the warning so that test can continue
-		$config = @$adapter->convert($url);
-
-		// Second definition of foo has level set to warn (the first to info)
-		$this->assertEquals('warn', $config['loggers']['foo']['level']);
-	}
+class XMLAdapterTest extends \PHPUnit_Framework_TestCase
+{
+    /** Expected output of parsing config1.xml.*/
+    private $expected1 = array(
+        'appenders' => array(
+            'default' => array(
+                'class' => 'EchoAppender',
+                'layout' => array(
+                    'class' => 'LoggerLayoutTTCC',
+                ),
+                'filters' => array(
+                    array(
+                        'class' => 'LevelRangeFilter',
+                        'params' => array(
+                            'levelMin' => 'ERROR',
+                            'levelMax' => 'FATAL',
+                            'acceptOnMatch' => 'false',
+                        ),
+                    ),
+                    array(
+                        'class' => 'DenyAllFilter',
+                    ),
+                ),
+            ),
+            'file' => array(
+                'class' => 'DailyFileAppender',
+                'layout' => array(
+                    'class' => 'PatternLayout',
+                    'params' => array(
+                        'conversionPattern' => '%d{ISO8601} [%p] %c: %m (at %F line %L)%n',
+                    ),
+                ),
+                'params' => array(
+                    'datePattern' => 'Ymd',
+                    'file' => 'target/examples/daily_%s.log',
+                ),
+                'threshold' => 'warn'
+            ),
+        ),
+        'loggers' => array(
+            'foo.bar.baz' => array(
+                'level' => 'trace',
+                'additivity' => 'false',
+                'appenders' => array('default'),
+            ),
+            'foo.bar' => array(
+                'level' => 'debug',
+                'additivity' => 'true',
+                'appenders' => array('file'),
+            ),
+            'foo' => array(
+                'level' => 'warn',
+                'appenders' => array('default', 'file'),
+            ),
+        ),
+        'renderers' => array(
+            array(
+                'renderedClass' => 'Fruit',
+                'renderingClass' => 'FruitRenderer',
+            ),
+            array(
+                'renderedClass' => 'Beer',
+                'renderingClass' => 'BeerRenderer',
+            ),
+        ),
+        'threshold' => 'debug',
+        'rootLogger' => array(
+            'level' => 'DEBUG',
+            'appenders' => array('default'),
+        ),
+    );
+
+    public function setUp()
+    {
+        Logger::resetConfiguration();
+    }
+
+    public function tearDown()
+    {
+        Logger::resetConfiguration();
+    }
+
+    public function testConversion()
+    {
+        $url =  PHPUNIT_CONFIG_DIR . '/adapters/xml/config_valid.xml';
+        $adapter = new XmlAdapter();
+        $actual = $adapter->convert($url);
+        $this->assertEquals($this->expected1, $actual);
+    }
+
+    public function testConversion2()
+    {
+        $url =  PHPUNIT_CONFIG_DIR . '/adapters/xml/config_valid_underscore.xml';
+        $adapter = new XmlAdapter();
+        $actual = $adapter->convert($url);
+
+        $this->assertEquals($this->expected1, $actual);
+    }
+
+    /**
+     * Test exception is thrown when file cannot be found.
+      * @expectedException Apache\Log4php\LoggerException
+      * @expectedExceptionMessage File [you/will/never/find/me.conf] does not exist.
+     */
+    public function testNonExistantFile()
+    {
+        $adapter = new XmlAdapter();
+        $adapter->convert('you/will/never/find/me.conf');
+    }
+
+    /**
+     * Test exception is thrown when file contains invalid XML.
+     * @expectedException Apache\Log4php\LoggerException
+     * @expectedExceptionMessage Error loading configuration file: Premature end of data in tag configuration line
+     */
+    public function testInvalidXMLFile()
+    {
+        $url =  PHPUNIT_CONFIG_DIR . '/adapters/xml/config_invalid_syntax.xml';
+        $adapter = new XmlAdapter();
+        $adapter->convert($url);
+    }
+
+    /**
+     * Test that a warning is triggered when two loggers with the same name
+     * are defined.
+      * @expectedException PHPUnit_Framework_Error
+      * @expectedExceptionMessage log4php: Duplicate logger definition [foo]. Overwriting
+     */
+    public function testDuplicateLoggerWarning()
+    {
+        $url =  PHPUNIT_CONFIG_DIR . '/adapters/xml/config_duplicate_logger.xml';
+        $adapter = new XmlAdapter();
+        $adapter->convert($url);
+    }
+
+    /**
+     * Test that when two loggers with the same name are defined, the second
+     * one will overwrite the first.
+     */
+    public function testDuplicateLoggerConfig()
+    {
+        $url =  PHPUNIT_CONFIG_DIR . '/adapters/xml/config_duplicate_logger.xml';
+        $adapter = new XmlAdapter();
+
+        // Supress the warning so that test can continue
+        $config = @$adapter->convert($url);
+
+        // Second definition of foo has level set to warn (the first to info)
+        $this->assertEquals('warn', $config['loggers']['foo']['level']);
+    }
 }
-
-?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/ExceptionTest.php
----------------------------------------------------------------------
diff --git a/tests/src/ExceptionTest.php b/tests/src/ExceptionTest.php
index 5b56f9e..e36c194 100644
--- a/tests/src/ExceptionTest.php
+++ b/tests/src/ExceptionTest.php
@@ -27,16 +27,18 @@ use Apache\Log4php\LoggerException;
 /**
  * @group main
  */
-class ExceptionTest extends \PHPUnit_Framework_TestCase {
-  	/**
-	 * @expectedException Apache\Log4php\LoggerException
-	 */
-	public function testMessage() {
-		try {
-			throw new LoggerException("TEST");
-    	} catch (LoggerException $e) {
-			self::assertEquals("TEST", $e->getMessage());
-			throw $e;
-		}
-	}
+class ExceptionTest extends \PHPUnit_Framework_TestCase
+{
+      /**
+     * @expectedException Apache\Log4php\LoggerException
+     */
+    public function testMessage()
+    {
+        try {
+            throw new LoggerException("TEST");
+        } catch (LoggerException $e) {
+            self::assertEquals("TEST", $e->getMessage());
+            throw $e;
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/FilterTest.php
----------------------------------------------------------------------
diff --git a/tests/src/FilterTest.php b/tests/src/FilterTest.php
index e54d01b..4448853 100644
--- a/tests/src/FilterTest.php
+++ b/tests/src/FilterTest.php
@@ -32,23 +32,24 @@ class MyFilter extends AbstractFilter {}
 /**
  * @group filters
  */
-class FilterTest extends \PHPUnit_Framework_TestCase {
-
-	public function testDecide() {
-		$filter = new MyFilter();
-		// activateOptions is empty, but should at least throw no exeception
-		$filter->activateOptions();
-		$eventError = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
-		$eventDebug = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelDebug(), "testmessage");
-		$eventWarn = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
-
-		$result = $filter->decide($eventError);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
-
-		$result = $filter->decide($eventDebug);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
-
-		$result = $filter->decide($eventWarn);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
+class FilterTest extends \PHPUnit_Framework_TestCase
+{
+    public function testDecide()
+    {
+        $filter = new MyFilter();
+        // activateOptions is empty, but should at least throw no exeception
+        $filter->activateOptions();
+        $eventError = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
+        $eventDebug = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelDebug(), "testmessage");
+        $eventWarn = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
+
+        $result = $filter->decide($eventError);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
+
+        $result = $filter->decide($eventDebug);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
+
+        $result = $filter->decide($eventWarn);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
     }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Filters/FilterDenyAllTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Filters/FilterDenyAllTest.php b/tests/src/Filters/FilterDenyAllTest.php
index ac41f3b..7109c9c 100644
--- a/tests/src/Filters/FilterDenyAllTest.php
+++ b/tests/src/Filters/FilterDenyAllTest.php
@@ -30,46 +30,48 @@ use Apache\Log4php\Logger;
 /**
  * @group filters
  */
-class FilterDenyAllTest extends \PHPUnit_Framework_TestCase {
+class FilterDenyAllTest extends \PHPUnit_Framework_TestCase
+{
+    public function testDecide()
+    {
+        $filter = new DenyAllFilter();
 
-	public function testDecide() {
-		$filter = new DenyAllFilter();
+        $events = array(
+            TestHelper::getTraceEvent(),
+            TestHelper::getDebugEvent(),
+            TestHelper::getInfoEvent(),
+            TestHelper::getWarnEvent(),
+            TestHelper::getErrorEvent(),
+            TestHelper::getFatalEvent(),
+        );
 
-		$events = array(
-			TestHelper::getTraceEvent(),
-			TestHelper::getDebugEvent(),
-			TestHelper::getInfoEvent(),
-			TestHelper::getWarnEvent(),
-			TestHelper::getErrorEvent(),
-			TestHelper::getFatalEvent(),
-		);
-
-		foreach($events as $event) {
-			$actual = $filter->decide($event);
-			self::assertEquals(AbstractFilter::DENY, $actual);
-		}
+        foreach ($events as $event) {
+            $actual = $filter->decide($event);
+            self::assertEquals(AbstractFilter::DENY, $actual);
+        }
     }
 
-    public function testConfiguration() {
-    	$config = DefaultConfigurator::getDefaultConfiguration();
-    	$config['appenders']['default']['filters'] = array(
-    		array(
-    			'class' => 'DenyAllFilter'
-    		)
-    	);
+    public function testConfiguration()
+    {
+        $config = DefaultConfigurator::getDefaultConfiguration();
+        $config['appenders']['default']['filters'] = array(
+            array(
+                'class' => 'DenyAllFilter'
+            )
+        );
 
-    	Logger::configure($config);
-    	$logger = Logger::getRootLogger();
+        Logger::configure($config);
+        $logger = Logger::getRootLogger();
 
-    	ob_start();
-    	$logger->trace('Test');
-    	$logger->debug('Test');
-    	$logger->info('Test');
-    	$logger->warn('Test');
-    	$logger->error('Test');
-    	$logger->fatal('Test');
-    	$actual = ob_get_clean();
+        ob_start();
+        $logger->trace('Test');
+        $logger->debug('Test');
+        $logger->info('Test');
+        $logger->warn('Test');
+        $logger->error('Test');
+        $logger->fatal('Test');
+        $actual = ob_get_clean();
 
-    	$this->assertEmpty($actual);
+        $this->assertEmpty($actual);
     }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Filters/FilterLevelMatchTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Filters/FilterLevelMatchTest.php b/tests/src/Filters/FilterLevelMatchTest.php
index 28f5601..9eddd68 100644
--- a/tests/src/Filters/FilterLevelMatchTest.php
+++ b/tests/src/Filters/FilterLevelMatchTest.php
@@ -29,156 +29,160 @@ use Apache\Log4php\Logger;
 /**
  * @group filters
  */
-class FilterLevelMatchTest extends \PHPUnit_Framework_TestCase {
-
-	/**
-	 * Tests all possible combinations of event level and filter levelToMatch
-	 * option, with acceptOnMatch set to TRUE.
-	 */
-	public function testDecideAccept() {
-		$filter = new LevelMatchFilter();
-		$filter->setAcceptOnMatch("true");
-
-		$levels = TestHelper::getAllLevels();
-		$events = TestHelper::getAllEvents();
-
-		foreach($levels as $level) {
-			$filter->setLevelToMatch($level);
-
-			foreach($events as $event) {
-				// Expecting given level to be accepted, neutral for others
-				$expected = ($event->getLevel() == $level) ? AbstractFilter::ACCEPT : AbstractFilter::NEUTRAL;
-				$actual = $filter->decide($event);
-
-				// Get string represenations for logging
-				$sExpected = TestHelper::decisionToString($expected);
-				$sActual = TestHelper::decisionToString($actual);
-
-				$this->assertSame($expected, $actual, "Failed asserting filter decision for event level <$level>. Expected <$sExpected>, found <$sActual>.");
-			}
-		}
-	}
-
-	/**
-	 * Tests all possible combinations of event level and filter levelToMatch
-	 * option, with acceptOnMatch set to TRUE.
-	 */
-	public function testDecideDeny() {
-		$filter = new LevelMatchFilter();
-		$filter->setAcceptOnMatch("false");
-
-		$levels = TestHelper::getAllLevels();
-		$events = TestHelper::getAllEvents();
-
-		foreach($levels as $level) {
-			$filter->setLevelToMatch($level);
-
-			foreach($events as $event) {
-				// Expecting given level to be denied, neutral for others
-				$expected = ($event->getLevel() == $level) ? AbstractFilter::DENY : AbstractFilter::NEUTRAL;
-				$actual = $filter->decide($event);
-
-				// Get string represenations for logging
-				$sExpected = TestHelper::decisionToString($expected);
-				$sActual = TestHelper::decisionToString($actual);
-
-				$this->assertSame($expected, $actual, "Failed asserting filter decision for event level <$level>. Expected <$sExpected>, found <$sActual>.");
-			}
-		}
-	}
-
-	/** Test that filter always decides NEUTRAL when levelToMatch is not set. */
-	public function testDecideNull() {
-		$filter = new LevelMatchFilter();
-		$events = TestHelper::getAllEvents();
-
-		foreach($events as $event) {
-			$expected = AbstractFilter::NEUTRAL;
-			$actual = $filter->decide($event);
-
-			// Get string represenations for logging
-			$sExpected = TestHelper::decisionToString($expected);
-			$sActual = TestHelper::decisionToString($actual);
-			$level = $event->getLevel();
-
-			$this->assertSame($expected, $actual, "Failed asserting filter decision for event level <$level>. Expected <$sExpected>, found <$sActual>.");
-		}
-	}
-
-	/** Test logger configuration. */
-	public function testAcceptConfig() {
-		$config = TestHelper::getEchoConfig();
-
-		// Add filters to default appender
-		$config['appenders']['default']['filters'] = array(
-
-			// Accepts only INFO events
-			array(
-				'class' => 'LevelMatchFilter',
-				'params' => array(
-					'levelToMatch' => 'info',
-					'acceptOnMatch' => true
-				)
-			),
-
-			// Denies all events not accepted by first filter
-			array(
-				'class' => 'DenyAllFilter',
-			)
-		);
-
-		Logger::configure($config);
-		$logger = Logger::getRootLogger();
-
-		ob_start();
-		$logger->trace('Test');
-		$logger->debug('Test');
-		$logger->info('Test');
-		$logger->warn('Test');
-		$logger->error('Test');
-		$logger->fatal('Test');
-
-		$actual = ob_get_clean();
-
-
-		$expected = "INFO - Test" . PHP_EOL;
-	}
-
-	public function testDenyConfig() {
-		$config = TestHelper::getEchoConfig();
-
-		// Add filter which denies INFO events
-		$config['appenders']['default']['filters'] = array(
-			array(
-				'class' => 'LevelMatchFilter',
-				'params' => array(
-					'levelToMatch' => 'info',
-					'acceptOnMatch' => false
-				)
-			)
-		);
-
-		Logger::configure($config);
-		$logger = Logger::getRootLogger();
-
-		ob_start();
-		$logger->trace('Test');
-		$logger->debug('Test');
-		$logger->info('Test');
-		$logger->warn('Test');
-		$logger->error('Test');
-		$logger->fatal('Test');
-
-		$actual = ob_get_clean();
-
-		// Should log all except info
-		$expected =
-			"TRACE - Test" . PHP_EOL .
-			"DEBUG - Test" . PHP_EOL .
-			"WARN - Test"  . PHP_EOL .
-			"ERROR - Test" . PHP_EOL .
-			"FATAL - Test" . PHP_EOL;
-
-		$this->assertSame($expected, $actual);
-	}
+class FilterLevelMatchTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * Tests all possible combinations of event level and filter levelToMatch
+     * option, with acceptOnMatch set to TRUE.
+     */
+    public function testDecideAccept()
+    {
+        $filter = new LevelMatchFilter();
+        $filter->setAcceptOnMatch("true");
+
+        $levels = TestHelper::getAllLevels();
+        $events = TestHelper::getAllEvents();
+
+        foreach ($levels as $level) {
+            $filter->setLevelToMatch($level);
+
+            foreach ($events as $event) {
+                // Expecting given level to be accepted, neutral for others
+                $expected = ($event->getLevel() == $level) ? AbstractFilter::ACCEPT : AbstractFilter::NEUTRAL;
+                $actual = $filter->decide($event);
+
+                // Get string represenations for logging
+                $sExpected = TestHelper::decisionToString($expected);
+                $sActual = TestHelper::decisionToString($actual);
+
+                $this->assertSame($expected, $actual, "Failed asserting filter decision for event level <$level>. Expected <$sExpected>, found <$sActual>.");
+            }
+        }
+    }
+
+    /**
+     * Tests all possible combinations of event level and filter levelToMatch
+     * option, with acceptOnMatch set to TRUE.
+     */
+    public function testDecideDeny()
+    {
+        $filter = new LevelMatchFilter();
+        $filter->setAcceptOnMatch("false");
+
+        $levels = TestHelper::getAllLevels();
+        $events = TestHelper::getAllEvents();
+
+        foreach ($levels as $level) {
+            $filter->setLevelToMatch($level);
+
+            foreach ($events as $event) {
+                // Expecting given level to be denied, neutral for others
+                $expected = ($event->getLevel() == $level) ? AbstractFilter::DENY : AbstractFilter::NEUTRAL;
+                $actual = $filter->decide($event);
+
+                // Get string represenations for logging
+                $sExpected = TestHelper::decisionToString($expected);
+                $sActual = TestHelper::decisionToString($actual);
+
+                $this->assertSame($expected, $actual, "Failed asserting filter decision for event level <$level>. Expected <$sExpected>, found <$sActual>.");
+            }
+        }
+    }
+
+    /** Test that filter always decides NEUTRAL when levelToMatch is not set. */
+    public function testDecideNull()
+    {
+        $filter = new LevelMatchFilter();
+        $events = TestHelper::getAllEvents();
+
+        foreach ($events as $event) {
+            $expected = AbstractFilter::NEUTRAL;
+            $actual = $filter->decide($event);
+
+            // Get string represenations for logging
+            $sExpected = TestHelper::decisionToString($expected);
+            $sActual = TestHelper::decisionToString($actual);
+            $level = $event->getLevel();
+
+            $this->assertSame($expected, $actual, "Failed asserting filter decision for event level <$level>. Expected <$sExpected>, found <$sActual>.");
+        }
+    }
+
+    /** Test logger configuration. */
+    public function testAcceptConfig()
+    {
+        $config = TestHelper::getEchoConfig();
+
+        // Add filters to default appender
+        $config['appenders']['default']['filters'] = array(
+
+            // Accepts only INFO events
+            array(
+                'class' => 'LevelMatchFilter',
+                'params' => array(
+                    'levelToMatch' => 'info',
+                    'acceptOnMatch' => true
+                )
+            ),
+
+            // Denies all events not accepted by first filter
+            array(
+                'class' => 'DenyAllFilter',
+            )
+        );
+
+        Logger::configure($config);
+        $logger = Logger::getRootLogger();
+
+        ob_start();
+        $logger->trace('Test');
+        $logger->debug('Test');
+        $logger->info('Test');
+        $logger->warn('Test');
+        $logger->error('Test');
+        $logger->fatal('Test');
+
+        $actual = ob_get_clean();
+
+        $expected = "INFO - Test" . PHP_EOL;
+    }
+
+    public function testDenyConfig()
+    {
+        $config = TestHelper::getEchoConfig();
+
+        // Add filter which denies INFO events
+        $config['appenders']['default']['filters'] = array(
+            array(
+                'class' => 'LevelMatchFilter',
+                'params' => array(
+                    'levelToMatch' => 'info',
+                    'acceptOnMatch' => false
+                )
+            )
+        );
+
+        Logger::configure($config);
+        $logger = Logger::getRootLogger();
+
+        ob_start();
+        $logger->trace('Test');
+        $logger->debug('Test');
+        $logger->info('Test');
+        $logger->warn('Test');
+        $logger->error('Test');
+        $logger->fatal('Test');
+
+        $actual = ob_get_clean();
+
+        // Should log all except info
+        $expected =
+            "TRACE - Test" . PHP_EOL .
+            "DEBUG - Test" . PHP_EOL .
+            "WARN - Test"  . PHP_EOL .
+            "ERROR - Test" . PHP_EOL .
+            "FATAL - Test" . PHP_EOL;
+
+        $this->assertSame($expected, $actual);
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Filters/FilterLevelRangeTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Filters/FilterLevelRangeTest.php b/tests/src/Filters/FilterLevelRangeTest.php
index 31999eb..171517b 100644
--- a/tests/src/Filters/FilterLevelRangeTest.php
+++ b/tests/src/Filters/FilterLevelRangeTest.php
@@ -31,45 +31,47 @@ use Apache\Log4php\LoggingEvent;
 /**
  * @group filters
  */
-class FilterLevelRangeTest extends \PHPUnit_Framework_TestCase {
+class FilterLevelRangeTest extends \PHPUnit_Framework_TestCase
+{
+    public function testDecide()
+    {
+        $filter = new LevelRangeFilter();
+        $filter->setAcceptOnMatch("true");
+        $filter->setLevelMin(Level::getLevelWarn());
+        $filter->setLevelMax(Level::getLevelError());
 
-	public function testDecide() {
-		$filter = new LevelRangeFilter();
-		$filter->setAcceptOnMatch("true");
-		$filter->setLevelMin(Level::getLevelWarn());
-		$filter->setLevelMax(Level::getLevelError());
+        $eventError = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
+        $eventDebug = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelDebug(), "testmessage");
+        $eventWarn = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
 
-		$eventError = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
-		$eventDebug = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelDebug(), "testmessage");
-		$eventWarn = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
+        $result = $filter->decide($eventError);
+        self::assertEquals($result, AbstractFilter::ACCEPT);
 
-		$result = $filter->decide($eventError);
-		self::assertEquals($result, AbstractFilter::ACCEPT);
+        $result = $filter->decide($eventDebug);
+        self::assertEquals($result, AbstractFilter::DENY);
 
-		$result = $filter->decide($eventDebug);
-		self::assertEquals($result, AbstractFilter::DENY);
-
-		$result = $filter->decide($eventWarn);
-		self::assertEquals($result, AbstractFilter::ACCEPT);
+        $result = $filter->decide($eventWarn);
+        self::assertEquals($result, AbstractFilter::ACCEPT);
     }
 
-    public function testDecideAcceptFalse() {
-		$filter = new LevelRangeFilter();
-		$filter->setAcceptOnMatch("false");
-		$filter->setLevelMin(Level::getLevelWarn());
-		$filter->setLevelMax(Level::getLevelError());
+    public function testDecideAcceptFalse()
+    {
+        $filter = new LevelRangeFilter();
+        $filter->setAcceptOnMatch("false");
+        $filter->setLevelMin(Level::getLevelWarn());
+        $filter->setLevelMax(Level::getLevelError());
 
-		$eventError = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
-		$eventDebug = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelDebug(), "testmessage");
-		$eventWarn = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
+        $eventError = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
+        $eventDebug = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelDebug(), "testmessage");
+        $eventWarn = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
 
-		$result = $filter->decide($eventError);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
+        $result = $filter->decide($eventError);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
 
-		$result = $filter->decide($eventDebug);
-		self::assertEquals($result, AbstractFilter::DENY);
+        $result = $filter->decide($eventDebug);
+        self::assertEquals($result, AbstractFilter::DENY);
 
-		$result = $filter->decide($eventWarn);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
+        $result = $filter->decide($eventWarn);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
     }
  }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Filters/FilterStringMatchTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Filters/FilterStringMatchTest.php b/tests/src/Filters/FilterStringMatchTest.php
index 5618412..dc07e08 100644
--- a/tests/src/Filters/FilterStringMatchTest.php
+++ b/tests/src/Filters/FilterStringMatchTest.php
@@ -31,88 +31,92 @@ use Apache\Log4php\LoggingEvent;
 /**
  * @group filters
  */
-class FilterStringMatchTest extends \PHPUnit_Framework_TestCase {
-
-	public function testDecideAccept() {
-		$filter = new StringMatchFilter();
-		$filter->setAcceptOnMatch("true");
-		$filter->setStringToMatch("testmessage");
-
-		$eventError = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
-		$eventError2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "xyz");
-		$eventDebug = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
-		$eventDebug2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelDebug(), "xyz");
-		$eventWarn = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
-		$eventWarn2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "xyz");
-
-		$result = $filter->decide($eventError);
-		self::assertEquals($result, AbstractFilter::ACCEPT);
-
-		$result = $filter->decide($eventError2);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
-
-		$result = $filter->decide($eventDebug);
-		self::assertEquals($result, AbstractFilter::ACCEPT);
-
-		$result = $filter->decide($eventDebug2);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
-
-		$result = $filter->decide($eventWarn);
-		self::assertEquals($result, AbstractFilter::ACCEPT);
-
-		$result = $filter->decide($eventWarn2);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
-	}
-
-	public function testDecideDeny() {
-		$filter = new StringMatchFilter();
-		$filter->setAcceptOnMatch("false");
-		$filter->setStringToMatch("testmessage");
-
-		$eventError = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
-		$eventError2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "xyz");
-		$eventDebug = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
-		$eventDebug2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelDebug(), "xyz");
-		$eventWarn = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
-		$eventWarn2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "xyz");
-
-		$result = $filter->decide($eventError);
-		self::assertEquals($result, AbstractFilter::DENY);
-
-		$result = $filter->decide($eventError2);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
-
-		$result = $filter->decide($eventDebug);
-		self::assertEquals($result, AbstractFilter::DENY);
-
-		$result = $filter->decide($eventDebug2);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
-
-		$result = $filter->decide($eventWarn);
-		self::assertEquals($result, AbstractFilter::DENY);
-
-		$result = $filter->decide($eventWarn2);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
-	}
-
-	public function testDecideNullMessage() {
-		$filter = new StringMatchFilter();
-		$filter->setAcceptOnMatch("false");
-		$filter->setStringToMatch("testmessage");
-
-		$event = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), null);
-
-		$result = $filter->decide($event);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
-	}
-
-	public function testDecideNullMatch() {
-		$filter = new StringMatchFilter();
-		$filter->setAcceptOnMatch("false");
-
-		$event = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
-
-		$result = $filter->decide($event);
-		self::assertEquals($result, AbstractFilter::NEUTRAL);
-	}
+class FilterStringMatchTest extends \PHPUnit_Framework_TestCase
+{
+    public function testDecideAccept()
+    {
+        $filter = new StringMatchFilter();
+        $filter->setAcceptOnMatch("true");
+        $filter->setStringToMatch("testmessage");
+
+        $eventError = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
+        $eventError2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "xyz");
+        $eventDebug = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
+        $eventDebug2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelDebug(), "xyz");
+        $eventWarn = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
+        $eventWarn2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "xyz");
+
+        $result = $filter->decide($eventError);
+        self::assertEquals($result, AbstractFilter::ACCEPT);
+
+        $result = $filter->decide($eventError2);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
+
+        $result = $filter->decide($eventDebug);
+        self::assertEquals($result, AbstractFilter::ACCEPT);
+
+        $result = $filter->decide($eventDebug2);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
+
+        $result = $filter->decide($eventWarn);
+        self::assertEquals($result, AbstractFilter::ACCEPT);
+
+        $result = $filter->decide($eventWarn2);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
+    }
+
+    public function testDecideDeny()
+    {
+        $filter = new StringMatchFilter();
+        $filter->setAcceptOnMatch("false");
+        $filter->setStringToMatch("testmessage");
+
+        $eventError = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
+        $eventError2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "xyz");
+        $eventDebug = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
+        $eventDebug2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelDebug(), "xyz");
+        $eventWarn = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "testmessage");
+        $eventWarn2 = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelWarn(), "xyz");
+
+        $result = $filter->decide($eventError);
+        self::assertEquals($result, AbstractFilter::DENY);
+
+        $result = $filter->decide($eventError2);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
+
+        $result = $filter->decide($eventDebug);
+        self::assertEquals($result, AbstractFilter::DENY);
+
+        $result = $filter->decide($eventDebug2);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
+
+        $result = $filter->decide($eventWarn);
+        self::assertEquals($result, AbstractFilter::DENY);
+
+        $result = $filter->decide($eventWarn2);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
+    }
+
+    public function testDecideNullMessage()
+    {
+        $filter = new StringMatchFilter();
+        $filter->setAcceptOnMatch("false");
+        $filter->setStringToMatch("testmessage");
+
+        $event = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), null);
+
+        $result = $filter->decide($event);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
+    }
+
+    public function testDecideNullMatch()
+    {
+        $filter = new StringMatchFilter();
+        $filter->setAcceptOnMatch("false");
+
+        $event = new LoggingEvent("LoggerAppenderEchoTest", new Logger("TEST"), Level::getLevelError(), "testmessage");
+
+        $result = $filter->decide($event);
+        self::assertEquals($result, AbstractFilter::NEUTRAL);
+    }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Helpers/OptionConverterTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Helpers/OptionConverterTest.php b/tests/src/Helpers/OptionConverterTest.php
index 6c00e43..e2ee509 100644
--- a/tests/src/Helpers/OptionConverterTest.php
+++ b/tests/src/Helpers/OptionConverterTest.php
@@ -31,9 +31,10 @@ define('MY_CONSTANT_CONSTANT_OTHER', 'DEFINE_OTHER');
 /**
  * @group helpers
  */
-class OptionConverterTest extends \PHPUnit_Framework_TestCase {
-
-    public function testToBoolean() {
+class OptionConverterTest extends \PHPUnit_Framework_TestCase
+{
+    public function testToBoolean()
+    {
         self::assertTrue(OptionConverter::toBooleanEx(1));
         self::assertTrue(OptionConverter::toBooleanEx("1"));
         self::assertTrue(OptionConverter::toBooleanEx(true));
@@ -51,11 +52,12 @@ class OptionConverterTest extends \PHPUnit_Framework_TestCase {
 
     /**
      * Test fail on NULL.
- 	 * @expectedException Apache\Log4php\LoggerException
- 	 * @expectedExceptionMessage Given value [NULL] cannot be converted to boolean.
+      * @expectedException Apache\Log4php\LoggerException
+      * @expectedExceptionMessage Given value [NULL] cannot be converted to boolean.
      */
-    public function testToBooleanFailure1() {
-    	OptionConverter::toBooleanEx(null);
+    public function testToBooleanFailure1()
+    {
+        OptionConverter::toBooleanEx(null);
     }
 
     /**
@@ -63,17 +65,19 @@ class OptionConverterTest extends \PHPUnit_Framework_TestCase {
      * @expectedException Apache\Log4php\LoggerException
      * @expectedExceptionMessage Given value ['foo'] cannot be converted to boolean.
      */
-    public function testToBooleanFailure2() {
-    	OptionConverter::toBooleanEx('foo');
+    public function testToBooleanFailure2()
+    {
+        OptionConverter::toBooleanEx('foo');
     }
 
-    public function testToInteger() {
-    	self::assertSame(1, OptionConverter::toIntegerEx('1'));
-    	self::assertSame(1, OptionConverter::toIntegerEx(1));
-    	self::assertSame(0, OptionConverter::toIntegerEx('0'));
-    	self::assertSame(0, OptionConverter::toIntegerEx(0));
-    	self::assertSame(-1, OptionConverter::toIntegerEx('-1'));
-    	self::assertSame(-1, OptionConverter::toIntegerEx(-1));
+    public function testToInteger()
+    {
+        self::assertSame(1, OptionConverter::toIntegerEx('1'));
+        self::assertSame(1, OptionConverter::toIntegerEx(1));
+        self::assertSame(0, OptionConverter::toIntegerEx('0'));
+        self::assertSame(0, OptionConverter::toIntegerEx(0));
+        self::assertSame(-1, OptionConverter::toIntegerEx('-1'));
+        self::assertSame(-1, OptionConverter::toIntegerEx(-1));
     }
 
     /**
@@ -81,8 +85,9 @@ class OptionConverterTest extends \PHPUnit_Framework_TestCase {
     * @expectedException Apache\Log4php\LoggerException
     * @expectedExceptionMessage Given value [NULL] cannot be converted to integer.
     */
-    public function testToIntegerFailure1() {
-    	OptionConverter::toIntegerEx(null);
+    public function testToIntegerFailure1()
+    {
+        OptionConverter::toIntegerEx(null);
     }
 
     /**
@@ -90,8 +95,9 @@ class OptionConverterTest extends \PHPUnit_Framework_TestCase {
      * @expectedException Apache\Log4php\LoggerException
      * @expectedExceptionMessage Given value [''] cannot be converted to integer.
      */
-    public function testToIntegerFailure2() {
-    	OptionConverter::toIntegerEx('');
+    public function testToIntegerFailure2()
+    {
+        OptionConverter::toIntegerEx('');
     }
 
     /**
@@ -99,8 +105,9 @@ class OptionConverterTest extends \PHPUnit_Framework_TestCase {
      * @expectedException Apache\Log4php\LoggerException
      * @expectedExceptionMessage Given value ['foo'] cannot be converted to integer.
      */
-    public function testToIntegerFailure3() {
-    	OptionConverter::toIntegerEx('foo');
+    public function testToIntegerFailure3()
+    {
+        OptionConverter::toIntegerEx('foo');
     }
 
     /**
@@ -108,8 +115,9 @@ class OptionConverterTest extends \PHPUnit_Framework_TestCase {
      * @expectedException Apache\Log4php\LoggerException
      * @expectedExceptionMessage Given value [true] cannot be converted to integer.
      */
-    public function testToIntegerFailure4() {
-    	OptionConverter::toIntegerEx(true);
+    public function testToIntegerFailure4()
+    {
+        OptionConverter::toIntegerEx(true);
     }
 
     /**
@@ -117,14 +125,16 @@ class OptionConverterTest extends \PHPUnit_Framework_TestCase {
      * @expectedException Apache\Log4php\LoggerException
      * @expectedExceptionMessage Given value [false] cannot be converted to integer.
      */
-    public function testToIntegerFailure5() {
-    	OptionConverter::toIntegerEx(false);
+    public function testToIntegerFailure5()
+    {
+        OptionConverter::toIntegerEx(false);
     }
 
-    public function testSubstituteConstants() {
-    	define('OTHER_CONSTANT', 'OTHER');
-    	define('MY_CONSTANT', 'TEST');
-    	define('NEXT_CONSTANT', 'NEXT');
+    public function testSubstituteConstants()
+    {
+        define('OTHER_CONSTANT', 'OTHER');
+        define('MY_CONSTANT', 'TEST');
+        define('NEXT_CONSTANT', 'NEXT');
 
         $result = OptionConverter::substConstants('Value of key is ${MY_CONSTANT}.');
         self::assertEquals('Value of key is TEST.', $result);
@@ -139,11 +149,12 @@ class OptionConverterTest extends \PHPUnit_Framework_TestCase {
         self::assertEquals('Value of key is DEFINE or DEFINE_OTHER.', $result);
     }
 
-    public function testActualSubstituteConstants() {
-    	$a = new FileAppender();
-    	$a->setFile('${PHPUNIT_TEMP_DIR}/log.txt');
-    	$actual = $a->getFile();
-    	$expected = PHPUNIT_TEMP_DIR . '/log.txt';
-    	self::assertSame($expected, $actual);
+    public function testActualSubstituteConstants()
+    {
+        $a = new FileAppender();
+        $a->setFile('${PHPUNIT_TEMP_DIR}/log.txt');
+        $actual = $a->getFile();
+        $expected = PHPUNIT_TEMP_DIR . '/log.txt';
+        self::assertSame($expected, $actual);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/35dfd5d3/tests/src/Helpers/PatternParserTest.php
----------------------------------------------------------------------
diff --git a/tests/src/Helpers/PatternParserTest.php b/tests/src/Helpers/PatternParserTest.php
index f849c2d..7005722 100644
--- a/tests/src/Helpers/PatternParserTest.php
+++ b/tests/src/Helpers/PatternParserTest.php
@@ -27,9 +27,10 @@ namespace Apache\Log4php\Tests\Helpers;
  *
  * TODO: Should also test complex patterns like: "%d{Y-m-d H:i:s} %-5p %c %X{username}: %m in %F at %L%n"
  */
-class LoggerPatternParserTest extends \PHPUnit_Framework_TestCase {
-
-    public function testErrorLayout() {
+class LoggerPatternParserTest extends \PHPUnit_Framework_TestCase
+{
+    public function testErrorLayout()
+    {
 // 		$event = new LoggingEvent("XmlLayout", new Logger("TEST"), Level::getLevelError(), "testmessage");
 // 		$expected = 'ERROR TEST : testmessage in NA at NA'.PHP_EOL;
 
@@ -42,7 +43,8 @@ class LoggerPatternParserTest extends \PHPUnit_Framework_TestCase {
 
     }
 
-    public function testClassname() {
+    public function testClassname()
+    {
 // 		$event = new LoggingEvent("MyClass", new Logger("TEST"), Level::getLevelError(), "testmessage");
 // 		$expected = 'MyClass';
 // 		$patternParser = new PatternParser("%C");


Mime
View raw message