com phpruntests: remove old class: src/testcase/sections/execut ablesections/_rtFileExternalSection.php
| From: | David Soria Parra | Date: | Sun, 17 May 2009 12:52:49 +0000 |
| Subject: | com phpruntests: remove old class: src/testcase/sections/execut ablesections/_rtFileExternalSection.php | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-66450@lists.php.net to get a copy of this message | ||
Commit: af9eb84a8877487aaf441123eef90376391a07e7
Author: Zoe Slattery <zoe@php.net> Sun, 17 May 2009 12:52:49 +0000
Parents: bd14f1d025099ace807b94b7dd59bf4c3db67d53
Branches: master
Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=af9eb84a8877487aaf441123eef90376391a07e7
Log:
remove old class
Changed paths:
D src/testcase/sections/executablesections/_rtFileExternalSection.php
Diff:
diff --git a/src/testcase/sections/executablesections/_rtFileExternalSection.php
b/src/testcase/sections/executablesections/_rtFileExternalSection.php
deleted file mode 100644
index 040d052..0000000
--- a/src/testcase/sections/executablesections/_rtFileExternalSection.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/**
- * rtFileExternalSection
- * Executes the code in the --FILE_EXTERNAL-- section
- *
- * @category Testing
- * @package RUNTESTS
- * @author Zoe Slattery <zoe@php.net>
- * @author Stefan Priebsch <spriebsch@php.net>
- * @author Georg Gradwohl <g2@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 rtFileExternalSection extends rtFileSection
-{
-
- public function run(rtPhpTest $testCase, rtRuntestsConfiguration $runConfiguration)
- {
- if ($this->copyExternalFileContent() === true) {
-
- return parent::run($testCase, $runConfiguration);
- }
-
- return $this->status;
- }
-
-
- private function copyExternalFileContent()
- {
- if (sizeof($this->sectionContents) == 1) {
-
- $file = $this->sectionContents[0];
-
- // don't allow tests to retrieve files from anywhere but this subdirectory
- $file = dirname($this->fileName).'/'.trim(str_replace('..',
'', $file));
-
- if (file_exists($file)) {
-
- $this->sectionContents[0] = file_get_contents($file);
- return true;
-
- } else {
-
- $this->status['fail'] = 'Can not open external file '.$file;
- }
-
- } else {
-
- $this->status['fail'] = 'One file per testcase permitted.';
- }
-
- return false;
- }
-}
-?>