logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject svn commit: r1164928 - /logging/log4php/trunk/src/test/php/appenders/LoggerAppenderSyslogTest.php
Date Sat, 03 Sep 2011 21:17:11 GMT
Author: ihabunek
Date: Sat Sep  3 21:17:10 2011
New Revision: 1164928

URL: http://svn.apache.org/viewvc?rev=1164928&view=rev
Log:
Minor improvements to Syslog appender unit tests.

Modified:
    logging/log4php/trunk/src/test/php/appenders/LoggerAppenderSyslogTest.php

Modified: logging/log4php/trunk/src/test/php/appenders/LoggerAppenderSyslogTest.php
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/test/php/appenders/LoggerAppenderSyslogTest.php?rev=1164928&r1=1164927&r2=1164928&view=diff
==============================================================================
--- logging/log4php/trunk/src/test/php/appenders/LoggerAppenderSyslogTest.php (original)
+++ logging/log4php/trunk/src/test/php/appenders/LoggerAppenderSyslogTest.php Sat Sep  3 21:17:10
2011
@@ -76,9 +76,8 @@ class LoggerAppenderSyslogTest extends P
 
 	/** Tests parsing of "option" parameter. */
 	public function testOption() {
-		
-		if(!class_exists("ReflectionClass") || method_exists('ReflectionProperty', 'setAccessible
')) {
-			$this->markTestSkipped("ReflectionClass required to perform this test.");
+		if(method_exists('ReflectionProperty', 'setAccessible')) {
+			$this->markTestSkipped("ReflectionProperty::setAccessible() required to perform this
test (available in PHP 5.3.2+).");
 		}
 		
 		$options = array(
@@ -120,9 +119,8 @@ class LoggerAppenderSyslogTest extends P
 	
 	/** Tests parsing of "priority" parameter. */
 	public function testPriority() {
-	
-		if(!class_exists("ReflectionClass") || method_exists('ReflectionProperty', 'setAccessible
')) {
-			$this->markTestSkipped("ReflectionClass required to perform this test.");
+		if(method_exists('ReflectionProperty', 'setAccessible')) {
+			$this->markTestSkipped("ReflectionProperty::setAccessible() required to perform this
test (available in PHP 5.3.2+).");
 		}
 	
 		$default = null;
@@ -161,9 +159,8 @@ class LoggerAppenderSyslogTest extends P
 	
 	/** Tests parsing of "facility" parameter. */
 	public function testFacility() {
-	
-		if(!class_exists("ReflectionClass") || method_exists('ReflectionProperty', 'setAccessible
')) {
-			$this->markTestSkipped("ReflectionClass required to perform this test.");
+		if(method_exists('ReflectionProperty', 'setAccessible')) {
+			$this->markTestSkipped("ReflectionProperty::setAccessible() required to perform this
test (available in PHP 5.3.2+).");
 		}
 	
 		// Default value is the same on all OSs
@@ -236,6 +233,10 @@ class LoggerAppenderSyslogTest extends P
 	
 	
 	public function testPriorityOverride() {
+		if(method_exists('ReflectionProperty', 'setAccessible')) {
+			$this->markTestSkipped("ReflectionProperty::setAccessible() required to perform this
test (available in PHP 5.3.2+).");
+		}
+		
 		$appender = new LoggerAppenderSyslog();
 		$appender->setPriority('EMERG');
 		$appender->setOverridePriority(true);



Mime
View raw message