cvs: phpruntests /tests/configuration/preconditions rtIsProcOpenAvailableTest.php
| From: | Stefan Priebsch | Date: | Tue, 12 May 2009 22:49:40 +0000 |
| Subject: | cvs: phpruntests /tests/configuration/preconditions rtIsProcOpenAvailableTest.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-57744@lists.php.net to get a copy of this message | ||
spriebsch Tue May 12 22:49:40 2009 UTC
Modified files:
/phpruntests/tests/configuration/preconditions
rtIsProcOpenAvailableTest.php
Log:
Fixed test to work with refactored rtRuntestsConfiguration.
http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php?r1=1.2&r2=1.3&diff_format=u
Index: phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php
diff -u phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php:1.2
phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php:1.3
--- phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php:1.2 Mon Apr 20
20:50:39 2009
+++ phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php Tue May 12 22:49:40
2009
@@ -1,15 +1,47 @@
<?php
+/**
+ * rtIsProcOpenAvailableTest
+ *
+ * @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 rtIsProcOpenAvailableTest 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 rtIsProcOpenAvailableTest extends PHPUnit_Framework_TestCase
{
- public function testAvailable()
+ protected function setUp()
{
- $pre = new rtIsProcOpenAvailable();
+ $this->preCondition = new rtIsProcOpenAvailable();
+ }
+
+ protected function tearDown()
+ {
+ unset($this->preCondition);
+ }
+
+ public function testCheck()
+ {
+ $runtestsConfiguration = rtRuntestsConfiguration::getInstance(array());
- $this->assertTrue($pre->check());
+ $this->assertEquals(function_exists('proc_open'),
$this->preCondition->check($runtestsConfiguration));
}
public function testgetMessage()
@@ -18,7 +50,5 @@
$this->assertEquals($pre->getMessage('procOpenNotAvailable'),
rtText::get('procOpenNotAvailable'));
}
-
- //Not sure how to check if it is missing?
}
?>