Permalink
Browse files

Yet again, another batch of underscores removed from protected & priv…

…ate properties
  • Loading branch information...
1 parent 8941448 commit 8e367e8a8336b81e6bb73f917a57e7dff4729d21 @perrick perrick committed Apr 26, 2008
Showing with 372 additions and 372 deletions.
  1. +45 −45 eclipse.php
  2. +11 −11 expectation.php
  3. +6 −6 test/frames_test.php
  4. +11 −11 test/shell_tester_test.php
  5. +10 −10 test/site/page_request.php
  6. +3 −3 test/visual_test.php
  7. +1 −1 test/xml_test.php
  8. +64 −64 url.php
  9. +39 −39 user_agent.php
  10. +103 −103 web_tester.php
  11. +79 −79 xml.php
View
@@ -28,14 +28,14 @@ class EclipseReporter extends SimpleScorer {
* @param boolean $cc Whether to include test coverage.
*/
function __construct(&$listener, $cc=false){
- $this->_listener = &$listener;
+ $this->listener = &$listener;
$this->SimpleScorer();
- $this->_case = "";
- $this->_group = "";
- $this->_method = "";
- $this->_cc = $cc;
- $this->_error = false;
- $this->_fail = false;
+ $this->case = "";
+ $this->group = "";
+ $this->method = "";
+ $this->cc = $cc;
+ $this->error = false;
+ $this->fail = false;
}
/**
@@ -64,7 +64,7 @@ function &createListener($port, $host="127.0.0.1"){
* @access public
*/
function &createInvoker(&$invoker){
- $eclinvoker = &new EclipseInvoker($invoker, $this->_listener);
+ $eclinvoker = &new EclipseInvoker($invoker, $this->listener);
return $eclinvoker;
}
@@ -86,10 +86,10 @@ function escapeVal($raw){
* @access public
*/
function paintPass($message){
- if (! $this->_pass){
- $this->_message = $this->escapeVal($message);
+ if (! $this->pass){
+ $this->message = $this->escapeVal($message);
}
- $this->_pass = true;
+ $this->pass = true;
}
/**
@@ -100,10 +100,10 @@ function paintPass($message){
*/
function paintFail($message){
//only get the first failure or error
- if (! $this->_fail && ! $this->_error){
- $this->_fail = true;
- $this->_message = $this->escapeVal($message);
- $this->_listener->write('{status:"fail",message:"'.$this->_message.'",group:"'.$this->_group.'",case:"'.$this->_case.'",method:"'.$this->_method.'"}');
+ if (! $this->fail && ! $this->error){
+ $this->fail = true;
+ $this->message = $this->escapeVal($message);
+ $this->listener->write('{status:"fail",message:"'.$this->message.'",group:"'.$this->group.'",case:"'.$this->case.'",method:"'.$this->method.'"}');
}
}
@@ -114,10 +114,10 @@ function paintFail($message){
* @access public
*/
function paintError($message){
- if (! $this->_fail && ! $this->_error){
- $this->_error = true;
- $this->_message = $this->escapeVal($message);
- $this->_listener->write('{status:"error",message:"'.$this->_message.'",group:"'.$this->_group.'",case:"'.$this->_case.'",method:"'.$this->_method.'"}');
+ if (! $this->fail && ! $this->error){
+ $this->error = true;
+ $this->message = $this->escapeVal($message);
+ $this->listener->write('{status:"error",message:"'.$this->message.'",group:"'.$this->group.'",case:"'.$this->case.'",method:"'.$this->method.'"}');
}
}
@@ -129,15 +129,15 @@ function paintError($message){
* @access public
*/
function paintException($exception){
- if (! $this->_fail && ! $this->_error){
- $this->_error = true;
+ if (! $this->fail && ! $this->error){
+ $this->error = true;
$message = 'Unexpected exception of type[' . get_class($exception) .
'] with message [' . $exception->getMessage() . '] in [' .
$exception->getFile() .' line '. $exception->getLine() . ']';
- $this->_message = $this->escapeVal($message);
- $this->_listener->write(
- '{status:"error",message:"' . $this->_message . '",group:"' .
- $this->_group . '",case:"' . $this->_case . '",method:"' . $this->_method
+ $this->message = $this->escapeVal($message);
+ $this->listener->write(
+ '{status:"error",message:"' . $this->message . '",group:"' .
+ $this->group . '",case:"' . $this->case . '",method:"' . $this->method
. '"}');
}
}
@@ -167,10 +167,10 @@ function paintFooter($test_name) {
* @access public
*/
function paintMethodStart($method) {
- $this->_pass = false;
- $this->_fail = false;
- $this->_error = false;
- $this->_method = $this->escapeVal($method);
+ $this->pass = false;
+ $this->fail = false;
+ $this->error = false;
+ $this->method = $this->escapeVal($method);
}
/**
@@ -180,12 +180,12 @@ function paintMethodStart($method) {
* @access public
*/
function paintMethodEnd($method){
- if ($this->_fail || $this->_error || ! $this->_pass){
+ if ($this->fail || $this->error || ! $this->pass){
} else {
- $this->_listener->write(
- '{status:"pass",message:"' . $this->_message . '",group:"' .
- $this->_group . '",case:"' . $this->_case . '",method:"' .
- $this->_method . '"}');
+ $this->listener->write(
+ '{status:"pass",message:"' . $this->message . '",group:"' .
+ $this->group . '",case:"' . $this->case . '",method:"' .
+ $this->method . '"}');
}
}
@@ -195,7 +195,7 @@ function paintMethodEnd($method){
* @access public
*/
function paintCaseStart($case){
- $this->_case = $this->escapeVal($case);
+ $this->case = $this->escapeVal($case);
}
/**
@@ -204,7 +204,7 @@ function paintCaseStart($case){
* @access public
*/
function paintCaseEnd($case){
- $this->_case = "";
+ $this->case = "";
}
/**
@@ -215,8 +215,8 @@ function paintCaseEnd($case){
* @access public
*/
function paintGroupStart($group, $size){
- $this->_group = $this->escapeVal($group);
- if ($this->_cc){
+ $this->group = $this->escapeVal($group);
+ if ($this->cc){
if (extension_loaded('xdebug')){
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
}
@@ -229,9 +229,9 @@ function paintGroupStart($group, $size){
* @access public
*/
function paintGroupEnd($group){
- $this->_group = "";
+ $this->group = "";
$cc = "";
- if ($this->_cc){
+ if ($this->cc){
if (extension_loaded('xdebug')){
$arrfiles = xdebug_get_code_coverage();
xdebug_stop_code_coverage();
@@ -261,7 +261,7 @@ function paintGroupEnd($group){
}
}
}
- $this->_listener->write('{status:"coverage",message:"' .
+ $this->listener->write('{status:"coverage",message:"' .
EclipseReporter::escapeVal($cc) . '"}');
}
}
@@ -274,7 +274,7 @@ function paintGroupEnd($group){
*/
class EclipseInvoker extends SimpleInvokerDecorator{
function __construct(&$invoker, &$listener) {
- $this->_listener = &$listener;
+ $this->listener = &$listener;
$this->SimpleInvokerDecorator($invoker);
}
@@ -285,7 +285,7 @@ function __construct(&$invoker, &$listener) {
*/
function before($method){
ob_start();
- $this->_invoker->before($method);
+ $this->invoker->before($method);
}
/**
@@ -295,11 +295,11 @@ function before($method){
* @access public
*/
function after($method) {
- $this->_invoker->after($method);
+ $this->invoker->after($method);
$output = ob_get_contents();
ob_end_clean();
if ($output !== ""){
- $result = $this->_listener->write('{status:"info",message:"' .
+ $result = $this->listener->write('{status:"info",message:"' .
EclipseReporter::escapeVal($output) . '"}');
}
}
View
@@ -221,7 +221,7 @@ function testMessage($compare) {
* @subpackage UnitTester
*/
class EqualExpectation extends SimpleExpectation {
- private $_value;
+ private $value;
/**
* Sets the value to compare against.
@@ -231,7 +231,7 @@ class EqualExpectation extends SimpleExpectation {
*/
function __construct($value, $message = '%s') {
parent::__construct($message);
- $this->_value = $value;
+ $this->value = $value;
}
/**
@@ -242,7 +242,7 @@ function __construct($value, $message = '%s') {
* @access public
*/
function test($compare) {
- return (($this->_value == $compare) && ($compare == $this->_value));
+ return (($this->value == $compare) && ($compare == $this->value));
}
/**
@@ -254,10 +254,10 @@ function test($compare) {
*/
function testMessage($compare) {
if ($this->test($compare)) {
- return "Equal expectation [" . $this->dumper->describeValue($this->_value) . "]";
+ return "Equal expectation [" . $this->dumper->describeValue($this->value) . "]";
} else {
return "Equal expectation fails " .
- $this->dumper->describeDifference($this->_value, $compare);
+ $this->dumper->describeDifference($this->value, $compare);
}
}
@@ -267,7 +267,7 @@ function testMessage($compare) {
* @access protected
*/
protected function getValue() {
- return $this->_value;
+ return $this->value;
}
}
@@ -446,7 +446,7 @@ function testMessage($compare) {
* @subpackage UnitTester
*/
class ReferenceExpectation {
- private $_value;
+ private $value;
/**
* Sets the reference value to compare against.
@@ -456,7 +456,7 @@ class ReferenceExpectation {
*/
function __construct(&$value, $message = '%s') {
$this->message = $message;
- $this->_value = &$value;
+ $this->value = &$value;
}
/**
@@ -467,7 +467,7 @@ function __construct(&$value, $message = '%s') {
* @access public
*/
function test(&$compare) {
- return SimpleTestCompatibility::isReference($this->_value, $compare);
+ return SimpleTestCompatibility::isReference($this->value, $compare);
}
/**
@@ -479,10 +479,10 @@ function test(&$compare) {
*/
function testMessage($compare) {
if ($this->test($compare)) {
- return "Reference expectation [" . $this->dumper->describeValue($this->_value) . "]";
+ return "Reference expectation [" . $this->dumper->describeValue($this->value) . "]";
} else {
return "Reference expectation fails " .
- $this->dumper->describeDifference($this->_value, $compare);
+ $this->dumper->describeDifference($this->value, $compare);
}
}
View
@@ -239,13 +239,13 @@ function testCanFocusByName() {
}
class TestOfFramesetPageInterface extends UnitTestCase {
- var $_page_interface;
- var $_frameset_interface;
+ private $page_interface;
+ private $frameset_interface;
function __construct() {
parent::__construct();
- $this->_page_interface = $this->getPageMethods();
- $this->_frameset_interface = $this->getFramesetMethods();
+ $this->page_interface = $this->getPageMethods();
+ $this->frameset_interface = $this->getFramesetMethods();
}
function assertListInAnyOrder($list, $expected) {
@@ -293,8 +293,8 @@ private function getFramesetMethods() {
function testFramsetHasPageInterface() {
$difference = array();
- foreach ($this->_page_interface as $method) {
- if (! in_array($method, $this->_frameset_interface)) {
+ foreach ($this->page_interface as $method) {
+ if (! in_array($method, $this->frameset_interface)) {
$this->fail("No [$method] in Frameset class");
return;
}
View
@@ -5,10 +5,10 @@
Mock::generate('SimpleShell');
class TestOfShellTestCase extends ShellTestCase {
- var $_mock_shell = false;
+ private $mock_shell = false;
function getShell() {
- return $this->_mock_shell;
+ return $this->mock_shell;
}
function testGenericEquality() {
@@ -17,24 +17,24 @@ function testGenericEquality() {
}
function testExitCode() {
- $this->_mock_shell = new MockSimpleShell();
- $this->_mock_shell->setReturnValue('execute', 0);
- $this->_mock_shell->expectOnce('execute', array('ls'));
+ $this->mock_shell = new MockSimpleShell();
+ $this->mock_shell->setReturnValue('execute', 0);
+ $this->mock_shell->expectOnce('execute', array('ls'));
$this->assertTrue($this->execute('ls'));
$this->assertExitCode(0);
}
function testOutput() {
- $this->_mock_shell = new MockSimpleShell();
- $this->_mock_shell->setReturnValue('execute', 0);
- $this->_mock_shell->setReturnValue('getOutput', "Line 1\nLine 2\n");
+ $this->mock_shell = new MockSimpleShell();
+ $this->mock_shell->setReturnValue('execute', 0);
+ $this->mock_shell->setReturnValue('getOutput', "Line 1\nLine 2\n");
$this->assertOutput("Line 1\nLine 2\n");
}
function testOutputPatterns() {
- $this->_mock_shell = new MockSimpleShell();
- $this->_mock_shell->setReturnValue('execute', 0);
- $this->_mock_shell->setReturnValue('getOutput', "Line 1\nLine 2\n");
+ $this->mock_shell = new MockSimpleShell();
+ $this->mock_shell->setReturnValue('execute', 0);
+ $this->mock_shell->setReturnValue('getOutput', "Line 1\nLine 2\n");
$this->assertOutputPattern('/line/i');
$this->assertNoOutputPattern('/line 2/');
}
Oops, something went wrong.

0 comments on commit 8e367e8

Please sign in to comment.