spriebsch Thu, 23 Jul 2009 11:32:38 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=284642
Log:
Switched remaining exceptions to rtException.
Changed paths:
U php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php
U php/phpruntests/trunk/src/configuration/rtIniAsCommandLineArgs.php
U php/phpruntests/trunk/src/configuration/rtPreConditionList.php
U php/phpruntests/trunk/src/rtText.php
U php/phpruntests/trunk/src/testcase/rtPhpRunner.php
U
php/phpruntests/trunk/src/testcase/sections/executablesections/rtCleanSection.php
U
php/phpruntests/trunk/src/testcase/sections/executablesections/rtFileSection.php
U
php/phpruntests/trunk/src/testcase/sections/executablesections/rtSkipIfSection.php
U php/phpruntests/trunk/src/testcase/sections/rtSection.php
U php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php
U php/phpruntests/trunk/tests/configuration/rtIniAsCommandLineArgsTest.php
U php/phpruntests/trunk/tests/testcase/sections/rtSectionTest.php
Modified: php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php
===================================================================
--- php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -156,7 +156,7 @@
}
if (!in_array($option, array_merge($this->shortOptions, $this->shortOptionsWithArgs, $this->longOptions, $this->longOptionsWithArgs))) {
- throw new rtUnknownOptionException('Unknown option ' . $argv[$i]);
+ throw new rtException('Unknown option ' . $argv[$i]);
}
if (in_array($option, array_merge($this->shortOptions, $this->longOptions))) {
@@ -165,7 +165,7 @@
}
if (!$this->isValidOptionArg($argv, $i + 1)) {
- throw new rtMissingArgumentException('Missing argument for command line option ' . $argv[$i]);
+ throw new rtException('Missing argument for command line option ' . $argv[$i]);
}
$i++;
Modified: php/phpruntests/trunk/src/configuration/rtIniAsCommandLineArgs.php
===================================================================
--- php/phpruntests/trunk/src/configuration/rtIniAsCommandLineArgs.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/src/configuration/rtIniAsCommandLineArgs.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -68,7 +68,7 @@
$setting = $this->stripSpaces($setting);
$args .= " -d \"$setting\"";
} else {
- throw new rtUnknownIniSettingException("Invalid INI setting $setting");
+ throw new rtException("Invalid INI setting $setting");
}
}
Modified: php/phpruntests/trunk/src/configuration/rtPreConditionList.php
===================================================================
--- php/phpruntests/trunk/src/configuration/rtPreConditionList.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/src/configuration/rtPreConditionList.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -54,7 +54,7 @@
$p = new $preCon;
if (!$p->check($config)) {
- throw new Exception($p->getMessage());
+ throw new rtException($p->getMessage());
}
}
Modified: php/phpruntests/trunk/src/rtText.php
===================================================================
--- php/phpruntests/trunk/src/rtText.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/src/rtText.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -29,7 +29,7 @@
$filename = dirname(__FILE__) . '/texts/' . $name . '.txt';
if (!file_exists($filename)) {
- throw new LogicException('The text ' . $name . ' does not exist');
+ throw new rtException('The text ' . $name . ' does not exist');
}
$text = file_get_contents($filename);
Modified: php/phpruntests/trunk/src/testcase/rtPhpRunner.php
===================================================================
--- php/phpruntests/trunk/src/testcase/rtPhpRunner.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/src/testcase/rtPhpRunner.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -49,7 +49,7 @@
);
if (!$proc) {
- throw new rtPhpRunnerException('Failed to open process to run PHP code in rtPhpRunner');
+ throw new rtException('Failed to open process to run PHP code in rtPhpRunner');
}
if (!is_null($this->stdin)) {
@@ -67,10 +67,10 @@
$n = @stream_select($r, $w, $e, $this->timeOut);
if ($n === false) {
- throw new rtPhpRunnerException('Stream select failure in rtPhpRunner');
+ throw new rtException('Stream select failure in rtPhpRunner');
} else if ($n === 0) {
proc_terminate($proc);
- throw new rtPhpRunnerException ('The process running test code has timed out in rtPhpRunner');
+ throw new rtException ('The process running test code has timed out in rtPhpRunner');
} else if ($n > 0) {
$line = fread($pipes[1], 8192);
if (strlen($line) == 0) {
@@ -84,7 +84,7 @@
/* check the process status. Note that this will always be FALSE on windows */
$stat = proc_get_status($proc);
if ($stat['signaled']) {
- throw new rtPhpRunnerException('The process was terminated by uncaught signal number in rtPhpRunners');
+ throw new rtException('The process was terminated by uncaught signal number in rtPhpRunners');
}
$code = proc_close($proc);
Modified: php/phpruntests/trunk/src/testcase/sections/executablesections/rtCleanSection.php
===================================================================
--- php/phpruntests/trunk/src/testcase/sections/executablesections/rtCleanSection.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/src/testcase/sections/executablesections/rtCleanSection.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -43,7 +43,7 @@
$testStatus->setMessage('fail_clean','Execution of clean section failed: '.trim($this->output) );
}
- } catch (rtPhpRunnerException $e) {
+ } catch (rtException $e) {
$testStatus->setTrue('fail_clean');
$testStatus->setMessage('fail_clean',$e->getMessage);
}
Modified: php/phpruntests/trunk/src/testcase/sections/executablesections/rtFileSection.php
===================================================================
--- php/phpruntests/trunk/src/testcase/sections/executablesections/rtFileSection.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/src/testcase/sections/executablesections/rtFileSection.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -68,7 +68,7 @@
}
- } catch (rtPhpRunnerException $e) {
+ } catch (rtException $e) {
$testStatus->setTrue('fail');
$testStatus->setMessage('fail', $e->getMessage() );
}
Modified: php/phpruntests/trunk/src/testcase/sections/executablesections/rtSkipIfSection.php
===================================================================
--- php/phpruntests/trunk/src/testcase/sections/executablesections/rtSkipIfSection.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/src/testcase/sections/executablesections/rtSkipIfSection.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -60,7 +60,7 @@
$testStatus->setMessage('warn', $matches[1]);
}
}
- } catch (rtPhpRunnerException $e) {
+ } catch (rtException $e) {
$testStatus->setTrue('fail_skip');
$testStatus->setMessage('fail_skip', 'Failed to execute skipif section' . $e->getMessage());
}
Modified: php/phpruntests/trunk/src/testcase/sections/rtSection.php
===================================================================
--- php/phpruntests/trunk/src/testcase/sections/rtSection.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/src/testcase/sections/rtSection.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -58,7 +58,7 @@
public static function getInstance($sectionName, $contents)
{
if (!isset(self::$sectionMap[$sectionName])) {
- throw new RuntimeException('Unknown section type ' . $sectionName);
+ throw new rtException('Unknown section type ' . $sectionName);
}
return new rtSection::$sectionMap[$sectionName]($sectionName, $contents);
Modified: php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php
===================================================================
--- php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -58,7 +58,7 @@
}
/**
- * @expectedException RuntimeException
+ * @expectedException rtException
*/
public function testMissingShortOptionArgument()
{
@@ -68,7 +68,7 @@
}
/**
- * @expectedException RuntimeException
+ * @expectedException rtException
*/
public function testMissingLongOptionArgument()
{
Modified: php/phpruntests/trunk/tests/configuration/rtIniAsCommandLineArgsTest.php
===================================================================
--- php/phpruntests/trunk/tests/configuration/rtIniAsCommandLineArgsTest.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/tests/configuration/rtIniAsCommandLineArgsTest.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -45,7 +45,7 @@
}
/**
- * @expectedException rtUnknownIniSettingException
+ * @expectedException rtException
*/
public function testInvalidArg()
{
Modified: php/phpruntests/trunk/tests/testcase/sections/rtSectionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/sections/rtSectionTest.php 2009-07-23 11:14:57 UTC (rev 284641)
+++ php/phpruntests/trunk/tests/testcase/sections/rtSectionTest.php 2009-07-23 11:32:38 UTC (rev 284642)
@@ -12,7 +12,7 @@
}
/**
- * @expectedException RuntimeException
+ * @expectedException rtException
*/
public function testGetInstanceThrowsExceptionOnUnknownSection()
{
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php