logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject svn commit: r1327039 - /logging/log4php/trunk/src/test/php/appenders/LoggerAppenderFirephpTest.php
Date Tue, 17 Apr 2012 10:54:49 GMT
Author: ihabunek
Date: Tue Apr 17 10:54:49 2012
New Revision: 1327039

URL: http://svn.apache.org/viewvc?rev=1327039&view=rev
Log:
Fixed firephp tests to be skipped if lib is not found.

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

Modified: logging/log4php/trunk/src/test/php/appenders/LoggerAppenderFirephpTest.php
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/test/php/appenders/LoggerAppenderFirephpTest.php?rev=1327039&r1=1327038&r2=1327039&view=diff
==============================================================================
--- logging/log4php/trunk/src/test/php/appenders/LoggerAppenderFirephpTest.php (original)
+++ logging/log4php/trunk/src/test/php/appenders/LoggerAppenderFirephpTest.php Tue Apr 17
10:54:49 2012
@@ -19,12 +19,12 @@
  * @package    log4php
  * @subpackage appenders
  * @license    http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
- * @version    SVN: $Id$
+ * @version    $Revision$
  * @link       http://logging.apache.org/log4php
  * @internal   Phpmd clean.
  */
 
-require_once('FirePHPCore/FirePHP.class.php');
+@include_once('FirePHPCore/FirePHP.class.php');
 
 /**
  * @group appenders
@@ -41,18 +41,24 @@ class LoggerAppenderFirephpTest extends 
 				'layout' => array(
 					'class' => 'LoggerLayoutPattern',
 				),
-				'params' => array('medium' => 'page')
+				'params' => array('target' => 'page')
 			)
 		)
 	);
 
+	public function setUp() {
+		if(!method_exists('FirePHP', 'to')) {
+			self::markTestSkipped("Please install 'FirePHP' in order to run this test");
+		}
+	}
+	
 	private function createEvent($message, $level) {
 		$eventMock = new LoggerLoggingEvent("LoggerAppenderFirephpTest", new Logger("TEST"), LoggerLevel::toLevel($level),
$message);
 	
 		return $eventMock;
 	}	
 	
-	public function testSetMedium() {
+	public function testSetTarget() {
 		$appender = new LoggerAppenderFirephp();
 		$appender->setTarget('page');
 		self::assertSame('page', $appender->getTarget());



Mime
View raw message