spriebsch               Tue May 12 22:56:22 2009 UTC

  Modified files:              
    /phpruntests/tests/configuration/preconditions      
                                                        
rtIsSafeModeDisabledTest.php 
  Log:
  Fixed test to work with refactored rtRuntestsConfiguration.
  
  
http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php?r1=1.2&r2=1.3&diff_format=u
Index: 
phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php
diff -u 
phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php:1.2 
phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php:1.3
--- 
phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php:1.2  
    Mon Apr 20 20:50:39 2009
+++ phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php  
Tue May 12 22:56:22 2009
@@ -1,24 +1,52 @@
 <?php
+/**
+ * rtIsSafeModeDisabledTest
+ *
+ * @category  Testing
+ * @package   RUNTESTS
+ * @author    Zoe Slattery <z...@php.net>
+ * @author    Stefan Priebsch <sprieb...@php.net>
+ * @copyright 2009 The PHP Group
+ * @license   http://www.php.net/license/3_01.txt PHP License 3.01
+ * @link      http://qa.php.net/
+ */
 
 require_once 'PHPUnit/Framework.php';
 require_once dirname(__FILE__) . '../../../../src/rtAutoload.php';
 
+/**
+ * Tests for rtIsSafeModeDisabledTest precondition.
+ *
+ * @category  Testing
+ * @package   RUNTESTS
+ * @author    Zoe Slattery <z...@php.net>
+ * @author    Stefan Priebsch <sprieb...@php.net>
+ * @copyright 2009 The PHP Group
+ * @license   http://www.php.net/license/3_01.txt PHP License 3.01
+ * @link      http://qa.php.net/
+ */
 class rtIssafeModeDisabledTest extends PHPUnit_Framework_TestCase
 {
-    public function testDisabled()
+    protected function setUp()
     {
-        $pre = new rtIsSafeModeDisabled();
+        $this->preCondition = new rtIsSafeModeDisabled();
+    }
 
-        $this->assertTrue($pre->check());
+    protected function tearDown()
+    {
+        unset($this->preCondition);
     }
 
-    public function testgetMessage()
+    public function testDisabled()
     {
-        $pre = new rtIsSafeModeDisabled();
+        $runtestsConfiguration = rtRuntestsConfiguration::getInstance(array());
 
-        $this->assertEquals($pre->getMessage('safeModeNotDisabled'), 
rtText::get('safeModeNotDisabled'));
+        $this->assertTrue($this->preCondition->check($runtestsConfiguration));
+    }
+
+    public function testGetMessage()
+    {
+        
$this->assertEquals($this->preCondition->getMessage('safeModeNotDisabled'), 
rtText::get('safeModeNotDisabled'));
     }
-    
-    //Not sure how to check if it is missing?
 }
 ?>



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to