Author: grobmeier
Date: Wed May 27 05:40:59 2009
New Revision: 779004

URL: http://svn.apache.org/viewvc?rev=779004&view=rev
Log:
made LoggerRoot::setParent compatible to Logger::setParent

Modified:
    incubator/log4php/trunk/src/main/php/LoggerRoot.php
    incubator/log4php/trunk/src/test/php/LoggerHierarchyTest.php
    incubator/log4php/trunk/src/test/php/LoggerRootTest.php

Modified: incubator/log4php/trunk/src/main/php/LoggerRoot.php
URL: 
http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/LoggerRoot.php?rev=779004&r1=779003&r2=779004&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/LoggerRoot.php (original)
+++ incubator/log4php/trunk/src/main/php/LoggerRoot.php Wed May 27 05:40:59 2009
@@ -74,7 +74,7 @@
         * @param Logger $parent
         * @return boolean
         */
-       public function setParent($parent) {
+       public function setParent(Logger $parent) {
                return false;
        }
 

Modified: incubator/log4php/trunk/src/test/php/LoggerHierarchyTest.php
URL: 
http://svn.apache.org/viewvc/incubator/log4php/trunk/src/test/php/LoggerHierarchyTest.php?rev=779004&r1=779003&r2=779004&view=diff
==============================================================================
--- incubator/log4php/trunk/src/test/php/LoggerHierarchyTest.php (original)
+++ incubator/log4php/trunk/src/test/php/LoggerHierarchyTest.php Wed May 27 
05:40:59 2009
@@ -27,7 +27,7 @@
        private $hierarchy;
         
        protected function setUp() {
-               $this->hierarchy = new LoggerHierarchy(new LoggerRoot());;
+               $this->hierarchy = new LoggerHierarchy(new LoggerRoot());
        }
        
        public function testIfLevelIsInitiallyLevelAllg() {
@@ -43,7 +43,8 @@
        }
 
        public function testSetParent() {
-               $this->hierarchy->getRootLogger()->setParent('dummy');
+               $l = $this->hierarchy->getLogger('dummy');
+               $this->hierarchy->getRootLogger()->setParent($l);
                $this->testIfParentIsNull();
        }
         

Modified: incubator/log4php/trunk/src/test/php/LoggerRootTest.php
URL: 
http://svn.apache.org/viewvc/incubator/log4php/trunk/src/test/php/LoggerRootTest.php?rev=779004&r1=779003&r2=779004&view=diff
==============================================================================
--- incubator/log4php/trunk/src/test/php/LoggerRootTest.php (original)
+++ incubator/log4php/trunk/src/test/php/LoggerRootTest.php Wed May 27 05:40:59 
2009
@@ -43,7 +43,9 @@
        }
 
        public function testSetParent() {
-               $this->loggerRoot->setParent('dummy');
+               $hierarchy = new LoggerHierarchy(new LoggerRoot());
+               $l = $hierarchy->getLogger('dummy');
+               $this->loggerRoot->setParent($l);
                $this->testIfParentIsNull();
        }
 


Reply via email to