com phpruntests: Fixed test to work with refactored rtRuntestsConfiguration.: tests/configuration/preconditions/rtIsSafeModeDisabledTest.php

From: Date: Tue, 12 May 2009 22:56:22 +0000
Subject: com phpruntests: Fixed test to work with refactored rtRuntestsConfiguration.: tests/configuration/preconditions/rtIsSafeModeDisabledTest.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-66476@lists.php.net to get a copy of this message
Commit: f1cfcc8737bb886fc52506ef3617b6dd8d43f012 Author: Stefan Priebsch <spriebsch@php.net> Tue, 12 May 2009 22:56:22 +0000 Parents: 9b23090c0c13f95bff369c957b89494e5af42aae Branches: master Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=f1cfcc8737bb886fc52506ef3617b6dd8d43f012 Log: Fixed test to work with refactored rtRuntestsConfiguration. Changed paths: M tests/configuration/preconditions/rtIsSafeModeDisabledTest.php Diff: diff --git a/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php b/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php index a060774..14860b7 100644 --- a/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php +++ b/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php @@ -1,24 +1,52 @@ <?php +/** + * rtIsSafeModeDisabledTest + * + * @category Testing + * @package RUNTESTS + * @author Zoe Slattery <zoe@php.net> + * @author Stefan Priebsch <spriebsch@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 <zoe@php.net> + * @author Stefan Priebsch <spriebsch@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? } ?>

« previous php.qa (#66476) next »