zoe Sat, 18 Jul 2009 17:38:12 +0000
URL: http://svn.php.net/viewvc?view=revision&revision=284332
Changed paths:
U php/phpruntests/trunk/src/testcase/rtPhpTest.php
Log:
remove unnecessary check
Modified: php/phpruntests/trunk/src/testcase/rtPhpTest.php
===================================================================
--- php/phpruntests/trunk/src/testcase/rtPhpTest.php 2009-07-18 17:10:12 UTC
(rev 284331)
+++ php/phpruntests/trunk/src/testcase/rtPhpTest.php 2009-07-18 17:38:12 UTC
(rev 284332)
@@ -42,7 +42,7 @@
{
$lastSection = end($this->sectionHeadings);
$start=0;
-
+
foreach($this->sectionHeadings as $keyNumber => $sectionKey) {
if($keyNumber < count($this->sectionHeadings) - 1) {
@@ -53,20 +53,17 @@
for($index=$start; $index<count($this->contents); $index++)
if($this->contents[$index] == "--".$sectionKey."--") {
//Found the beginning of the section
-
+
for($contentsLine=$index + 1;
$contentsLine<count($this->contents); $contentsLine ++) {
-
+
if( ($this->contents[$contentsLine] == "--".$nextKey."--")
|| ($contentsLine == count($this->contents))) {
//Found the end of the section OR the end of the test
$start = $contentsLine - 1;
if($this->isFileSection($sectionKey)) {
$tempArray = $this->removeDone($tempArray);
- }
-
- if(count($tempArray) > 0) {
- $testSection = rtSection::getInstance($sectionKey,
$tempArray);
- $this->sections[$sectionKey] = $testSection;
- }
+ }
+ $testSection = rtSection::getInstance($sectionKey,
$tempArray);
+ $this->sections[$sectionKey] = $testSection;
break;
} else {
$tempArray[] = $this->contents[$contentsLine];
@@ -183,7 +180,7 @@
$result = array();
foreach($array as $line) {
$result[] = $line;
- // If found at the start of the line, so ' ===done===' won't work.
+ // If found at the start of the line, so ' ===done===' won't work.
if(stripos($line, "===done===") === 0) {
break;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php