spriebsch Tue May 12 22:45:47 2009 UTC
Modified files:
/phpruntests/tests/configuration/preconditions
rtIsPcreLoadedTest.php
Log:
Fixed test to work with refactored rtRuntestsConfiguration.
http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php?r1=1.2&r2=1.3&diff_format=u
Index: phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php
diff -u
phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php:1.2
phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php:1.3
--- phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php:1.2
Mon Apr 20 20:50:39 2009
+++ phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php
Tue May 12 22:45:47 2009
@@ -1,22 +1,52 @@
<?php
+/**
+ * rtIsPcreLoadedTest
+ *
+ * @category Testing
+ * @package RUNTESTS
+ * @author Zoe Slattery <[email protected]>
+ * @author Stefan Priebsch <[email protected]>
+ * @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 rtIsPcreLoadedTest precondition.
+ *
+ * @category Testing
+ * @package RUNTESTS
+ * @author Zoe Slattery <[email protected]>
+ * @author Stefan Priebsch <[email protected]>
+ * @copyright 2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @link http://qa.php.net/
+ */
class rtIsPcreLoadedTest extends PHPUnit_Framework_TestCase
{
+ protected function setUp()
+ {
+ $this->preCondition = new rtIsPcreLoaded();
+ }
+
+ protected function tearDown()
+ {
+ unset($this->preCondition);
+ }
+
public function testLoaded()
{
- $pre = new rtIsPcreLoaded();
- $this->assertTrue($pre->check());
+ $runtestsConfiguration = rtRuntestsConfiguration::getInstance(array());
+
+ $this->assertEquals(extension_loaded('pcre'),
$this->preCondition->check($runtestsConfiguration));
}
- public function testgetMessage()
+ public function testGetMessage()
{
- $pre = new rtIsPcreLoaded();
- $this->assertEquals($pre->getMessage('pcreNotLoaded'),
rtText::get('pcreNotLoaded'));
+ $this->assertEquals($this->preCondition->getMessage('pcreNotLoaded'),
rtText::get('pcreNotLoaded'));
}
-
- //Not sure how to check if it's not loaded?
}
?>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php