logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject [4/4] git commit: LOG4PHP-203; fixed tests for capped collections for mongo appender.
Date Tue, 01 Jan 2013 10:39:38 GMT
Updated Branches:
  refs/heads/develop ada46fd79 -> d9b26e334


LOG4PHP-203; fixed tests for capped collections for mongo appender.

Signed-off-by: Vladimir Gorej <gorej@codescale.net>
Signed-off-by: Ivan Habunek <ihabunek@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/logging-log4php/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4php/commit/d9b26e33
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4php/tree/d9b26e33
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4php/diff/d9b26e33

Branch: refs/heads/develop
Commit: d9b26e334bca2d11c7bfd15995239d7be64eef59
Parents: aab1162
Author: Vladimir Gorej <gorej@codescale.net>
Authored: Mon Dec 31 16:01:22 2012 +0100
Committer: Ivan Habunek <ihabunek@apache.org>
Committed: Tue Jan 1 11:35:11 2013 +0100

----------------------------------------------------------------------
 .../php/appenders/LoggerAppenderMongoDBTest.php    |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4php/blob/d9b26e33/src/test/php/appenders/LoggerAppenderMongoDBTest.php
----------------------------------------------------------------------
diff --git a/src/test/php/appenders/LoggerAppenderMongoDBTest.php b/src/test/php/appenders/LoggerAppenderMongoDBTest.php
index b29d5b9..fe7a62c 100644
--- a/src/test/php/appenders/LoggerAppenderMongoDBTest.php
+++ b/src/test/php/appenders/LoggerAppenderMongoDBTest.php
@@ -42,11 +42,16 @@ class LoggerAppenderMongoDBTest extends PHPUnit_Framework_TestCase {
 			);
 		} else {
 			$this->appender = new LoggerAppenderMongoDB('mongo_appender');
+			$this->appender->setCollectionName('log4php_mongodb_test');
 			$this->event = LoggerTestHelper::getErrorEvent('mongo logging event', 'test_mongo');
 		}
 	}
 
 	protected function tearDown() {
+		$collection = $this->appender->getCollection();
+		if ($collection !== null) {
+			$collection->drop();
+		}
 		unset($this->appender);
 	}
 	
@@ -65,7 +70,7 @@ class LoggerAppenderMongoDBTest extends PHPUnit_Framework_TestCase {
 	}
 
 	public function testDatabaseName() {
-		$expected = 'log4php_mongodb';
+		$expected = 'log4php_mongodb_test';
 		$this->appender->setDatabaseName($expected);
 		$result	= $this->appender->getDatabaseName();
 		$this->assertEquals($expected, $result);


Mime
View raw message