zoe Mon May 25 12:28:40 2009 UTC
Modified files:
/phpruntests/src/testcase rtPhpTest.php rtTestOutputWriter.php
rtTestPreCondition.php rtTestResults.php
rtTestConfiguration.php rtPhpTestFile.php
rtTestDifference.php rtPhpRunner.php
Log:
doc blocks
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtPhpTest.php?r1=1.7&r2=1.8&diff_format=u
Index: phpruntests/src/testcase/rtPhpTest.php
diff -u phpruntests/src/testcase/rtPhpTest.php:1.7
phpruntests/src/testcase/rtPhpTest.php:1.8
--- phpruntests/src/testcase/rtPhpTest.php:1.7 Sun May 17 19:57:26 2009
+++ phpruntests/src/testcase/rtPhpTest.php Mon May 25 12:28:40 2009
@@ -1,5 +1,6 @@
<?php
/**
+ * rtPhpTest
*
* This class represents a single phpt test case.
*
@@ -11,7 +12,6 @@
* @license http://www.php.net/license/3_01.txt PHP License 3.01
*
*/
-
class rtPhpTest
{
public $testConfiguration;
@@ -34,6 +34,9 @@
$this->init($runConfiguration);
}
+ /**
+ * Creates a section object for each test section
+ */
public function parse()
{
for ($i=0; $i<count($this->contents); $i++) {
@@ -67,13 +70,25 @@
$this->fileSection->setExecutableFileName($this->getName());
}
+
+ /**
+ * Initialises the configuration for this test. Uses the configuration
sections from teh test case
+ *
+ * @param rtRunTEstsConfiuration $runConfiguration
+ *
+ */
public function init(rtRuntestsConfiguration $runConfiguration)
{
$this->testConfiguration = new rtTestConfiguration($runConfiguration,
$this->sections, $this->sectionHeadings, $this->fileSection);
}
+
- //run
+ /**
+ * Executes the test case
+ *
+ * @param rtRunTEstsConfiuration $runConfiguration
+ */
public function executeTest(rtRuntestsConfiguration $runConfiguration)
{
$this->status = array();
@@ -103,6 +118,10 @@
}
}
+ /**
+ * Test the output against the expect section
+ *
+ */
public function compareOutput()
{
$result = $this->expectSection->compare($this->output);
@@ -114,6 +133,11 @@
}
}
+
+ /**
+ * Test the expected headers against actual headers. Only relevant for CGI
tests.
+ *
+ */
public function compareHeaders()
{
$result = $this->sections['EXPECTHEADERS']->compare($this->headers);
@@ -125,6 +149,11 @@
}
}
+
+ /**
+ * Identify a section heading
+ *
+ */
private function isSectionKey($line)
{
if (in_array($line, $this->sectionHeadings)) {
@@ -134,6 +163,9 @@
}
+ /**
+ * Set the test's file section
+ */
private function setFileSection()
{
if (array_key_exists('FILE', $this->sections)) {
@@ -149,6 +181,10 @@
}
}
+
+ /**
+ * Sets the test's expect section
+ */
private function setExpectSection()
{
if (array_key_exists('EXPECT', $this->sections)) {
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtTestOutputWriter.php?r1=1.2&r2=1.3&diff_format=u
Index: phpruntests/src/testcase/rtTestOutputWriter.php
diff -u phpruntests/src/testcase/rtTestOutputWriter.php:1.2
phpruntests/src/testcase/rtTestOutputWriter.php:1.3
--- phpruntests/src/testcase/rtTestOutputWriter.php:1.2 Fri Apr 24 08:41:26 2009
+++ phpruntests/src/testcase/rtTestOutputWriter.php Mon May 25 12:28:40 2009
@@ -1,6 +1,16 @@
<?php
/**
- * Class for writing the output from a test
+ * rtTestOutputWriter
+ *
+ * Writes test output. This is concerned with status (PASS, FAIL etc) not
+ * with the log files.
+ *
+ * @category Quality Assurance
+ * @package run-tests
+ * @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
*
*/
abstract class rtTestOutputWriter
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtTestPreCondition.php?r1=1.2&r2=1.3&diff_format=u
Index: phpruntests/src/testcase/rtTestPreCondition.php
diff -u phpruntests/src/testcase/rtTestPreCondition.php:1.2
phpruntests/src/testcase/rtTestPreCondition.php:1.3
--- phpruntests/src/testcase/rtTestPreCondition.php:1.2 Fri Apr 24 08:41:26 2009
+++ phpruntests/src/testcase/rtTestPreCondition.php Mon May 25 12:28:40 2009
@@ -1,5 +1,17 @@
<?php
-
+/**
+ * rtTestPreCondition
+ *
+ * Parent class for test case pre-conditions
+ *
+ * @category Quality Assurance
+ * @package run-tests
+ * @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
+ *
+ */
interface rtTestPreCondition
{
public function isMet(array $testContents);
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtTestResults.php?r1=1.2&r2=1.3&diff_format=u
Index: phpruntests/src/testcase/rtTestResults.php
diff -u phpruntests/src/testcase/rtTestResults.php:1.2
phpruntests/src/testcase/rtTestResults.php:1.3
--- phpruntests/src/testcase/rtTestResults.php:1.2 Fri Apr 24 08:41:26 2009
+++ phpruntests/src/testcase/rtTestResults.php Mon May 25 12:28:40 2009
@@ -1,5 +1,7 @@
<?php
/**
+ * rtTestResults
+ *
* Class to store test results.
*
* Ensures that files are either deleted or saved depending on the test results
@@ -7,6 +9,13 @@
* Maintains (adds to) the tests case status to give a final status array
* Request calculation of difference between expected/actual output if the
test has failed.
*
+ * @category Quality Assurance
+ * @package run-tests
+ * @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
+ *
*/
class rtTestResults
{
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtTestConfiguration.php?r1=1.14&r2=1.15&diff_format=u
Index: phpruntests/src/testcase/rtTestConfiguration.php
diff -u phpruntests/src/testcase/rtTestConfiguration.php:1.14
phpruntests/src/testcase/rtTestConfiguration.php:1.15
--- phpruntests/src/testcase/rtTestConfiguration.php:1.14 Thu May 14
11:34:59 2009
+++ phpruntests/src/testcase/rtTestConfiguration.php Mon May 25 12:28:40 2009
@@ -13,8 +13,6 @@
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @link http://qa.php.net/
*/
-
-
class rtTestConfiguration
{
private $environmentVariables;
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtPhpTestFile.php?r1=1.2&r2=1.3&diff_format=u
Index: phpruntests/src/testcase/rtPhpTestFile.php
diff -u phpruntests/src/testcase/rtPhpTestFile.php:1.2
phpruntests/src/testcase/rtPhpTestFile.php:1.3
--- phpruntests/src/testcase/rtPhpTestFile.php:1.2 Fri Apr 24 08:41:26 2009
+++ phpruntests/src/testcase/rtPhpTestFile.php Mon May 25 12:28:40 2009
@@ -1,6 +1,15 @@
<?php
/**
- * Class to deal with all file system operations for a test case
+ * rtPhpTestFile
+ *
+ * Reads the test file and checks pre-conditions
+ *
+ * @category Quality Assurance
+ * @package run-tests
+ * @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
*
*/
class rtPhpTestFile
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtTestDifference.php?r1=1.2&r2=1.3&diff_format=u
Index: phpruntests/src/testcase/rtTestDifference.php
diff -u phpruntests/src/testcase/rtTestDifference.php:1.2
phpruntests/src/testcase/rtTestDifference.php:1.3
--- phpruntests/src/testcase/rtTestDifference.php:1.2 Fri Apr 24 08:41:26 2009
+++ phpruntests/src/testcase/rtTestDifference.php Mon May 25 12:28:40 2009
@@ -1,6 +1,16 @@
<?php
/**
- * Calculates the difference between the expected and actual output
+ * rtTestDifference
+ *
+ * Calculates difference between actual and expected output.
+ * Exact import from run-tests.php
+ *
+ * @category Quality Assurance
+ * @package run-tests
+ * @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
*
*/
class rtTestDifference
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtPhpRunner.php?r1=1.2&r2=1.3&diff_format=u
Index: phpruntests/src/testcase/rtPhpRunner.php
diff -u phpruntests/src/testcase/rtPhpRunner.php:1.2
phpruntests/src/testcase/rtPhpRunner.php:1.3
--- phpruntests/src/testcase/rtPhpRunner.php:1.2 Fri Apr 24 08:41:26 2009
+++ phpruntests/src/testcase/rtPhpRunner.php Mon May 25 12:28:40 2009
@@ -1,7 +1,17 @@
<?php
/**
- * Execution of PHP code.
+ * rtPhpRunner
+ *
+ * Runs PHP code
*
+ *
+ * @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 rtPhpRunner
{
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php