@@ -7,21 +7,21 @@ |
||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | define('PRADO_TEST_RUN', true); |
| 10 | -define('PRADO_FRAMEWORK_DIR', dirname(__FILE__).'/../../framework'); |
|
| 11 | -define('VENDOR_DIR', dirname(__FILE__).'/../../vendor'); |
|
| 12 | -set_include_path(PRADO_FRAMEWORK_DIR.PATH_SEPARATOR.get_include_path()); |
|
| 10 | +define('PRADO_FRAMEWORK_DIR', dirname(__FILE__) . '/../../framework'); |
|
| 11 | +define('VENDOR_DIR', dirname(__FILE__) . '/../../vendor'); |
|
| 12 | +set_include_path(PRADO_FRAMEWORK_DIR . PATH_SEPARATOR . get_include_path()); |
|
| 13 | 13 | // coverage tests waste a lot of memory! |
| 14 | 14 | ini_set('memory_limit', '1G'); |
| 15 | 15 | |
| 16 | 16 | date_default_timezone_set('UTC'); |
| 17 | 17 | |
| 18 | -if (!@include_once VENDOR_DIR.'/autoload.php') { |
|
| 18 | +if (!@include_once VENDOR_DIR . '/autoload.php') { |
|
| 19 | 19 | die('You must set up the project dependencies, run the following commands: |
| 20 | 20 | wget http://getcomposer.org/composer.phar |
| 21 | 21 | php composer.phar install'); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | -require_once(PRADO_FRAMEWORK_DIR.'/prado.php'); |
|
| 24 | +require_once(PRADO_FRAMEWORK_DIR . '/prado.php'); |
|
| 25 | 25 | |
| 26 | 26 | // for FunctionalTests |
| 27 | -require_once(__DIR__.'/PradoGenericSelenium2Test.php'); |
|
| 28 | 27 | \ No newline at end of file |
| 28 | +require_once(__DIR__ . '/PradoGenericSelenium2Test.php'); |
|
| 29 | 29 | \ No newline at end of file |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * @static |
| 60 | 60 | */ |
| 61 | 61 | static function sendNoCacheHeaders() { |
| 62 | - if (! headers_sent()) { |
|
| 62 | + if (!headers_sent()) { |
|
| 63 | 63 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
| 64 | 64 | header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
| 65 | 65 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | * @access public |
| 176 | 176 | */ |
| 177 | 177 | function paintHeader($test_name) { |
| 178 | - if (! SimpleReporter::inCli()) { |
|
| 178 | + if (!SimpleReporter::inCli()) { |
|
| 179 | 179 | header('Content-type: text/plain'); |
| 180 | 180 | } |
| 181 | 181 | print "$test_name\n"; |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | * @subpackage UnitTester |
| 246 | 246 | */ |
| 247 | 247 | class SelectiveReporter extends SimpleReporterDecorator { |
| 248 | - protected $_just_this_case =false; |
|
| 248 | + protected $_just_this_case = false; |
|
| 249 | 249 | protected $_just_this_test = false; |
| 250 | 250 | protected $_within_test_case = true; |
| 251 | 251 | |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | function getUrlById($id) { |
| 431 | 431 | foreach ($this->_frames as $index => $frame) { |
| 432 | 432 | if ($url = $frame->getUrlById($id)) { |
| 433 | - if (! $url->gettarget()) { |
|
| 433 | + if (!$url->gettarget()) { |
|
| 434 | 434 | $url->setTarget($this->_getPublicNameFromIndex($index)); |
| 435 | 435 | } |
| 436 | 436 | return $url; |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | function _tagUrlsWithFrame($urls, $frame) { |
| 450 | 450 | $tagged = array(); |
| 451 | 451 | foreach ($urls as $url) { |
| 452 | - if (! $url->getTarget()) { |
|
| 452 | + if (!$url->getTarget()) { |
|
| 453 | 453 | $url->setTarget($this->_getPublicNameFromIndex($frame)); |
| 454 | 454 | } |
| 455 | 455 | $tagged[] = $url; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $is_identical = SimpleTestCompatibility::_isIdenticalType( |
| 90 | 90 | $first[$key], |
| 91 | 91 | $second[$key]); |
| 92 | - if (! $is_identical) { |
|
| 92 | + if (!$is_identical) { |
|
| 93 | 93 | return false; |
| 94 | 94 | } |
| 95 | 95 | } |
@@ -134,9 +134,9 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | static function isA($object, $class) { |
| 136 | 136 | if (version_compare(phpversion(), '5') >= 0) { |
| 137 | - if (! class_exists($class, false)) { |
|
| 137 | + if (!class_exists($class, false)) { |
|
| 138 | 138 | if (function_exists('interface_exists')) { |
| 139 | - if (! interface_exists($class, false)) { |
|
| 139 | + if (!interface_exists($class, false)) { |
|
| 140 | 140 | return false; |
| 141 | 141 | } |
| 142 | 142 | } |
@@ -189,7 +189,7 @@ |
||
| 189 | 189 | * @access private |
| 190 | 190 | */ |
| 191 | 191 | function _findRealmFromUrl($url) { |
| 192 | - if (! isset($this->_realms[$url->getHost()])) { |
|
| 192 | + if (!isset($this->_realms[$url->getHost()])) { |
|
| 193 | 193 | return false; |
| 194 | 194 | } |
| 195 | 195 | foreach ($this->_realms[$url->getHost()] as $name => $realm) { |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | /** @ignore - PHP5 compatibility fix. */ |
| 10 | - if (! defined('E_STRICT')) { |
|
| 10 | + if (!defined('E_STRICT')) { |
|
| 11 | 11 | define('E_STRICT', 2048); |
| 12 | 12 | } |
| 13 | 13 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | static function instance() { |
| 125 | 125 | static $queue = false; |
| 126 | - if (! $queue) { |
|
| 126 | + if (!$queue) { |
|
| 127 | 127 | $queue = new SimpleErrorQueue(); |
| 128 | 128 | } |
| 129 | 129 | return $queue; |
@@ -188,7 +188,7 @@ |
||
| 188 | 188 | */ |
| 189 | 189 | static function &_getRegistry() { |
| 190 | 190 | static $registry = false; |
| 191 | - if (! $registry) { |
|
| 191 | + if (!$registry) { |
|
| 192 | 192 | $registry = SimpleTest::_getDefaults(); |
| 193 | 193 | } |
| 194 | 194 | return $registry; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | function SimpleSocket($host, $port, $timeout, $block_size = 255) { |
| 89 | 89 | $this->SimpleStickyError(); |
| 90 | - if (! ($this->_handle = $this->_openSocket($host, $port, $error_number, $error, $timeout))) { |
|
| 90 | + if (!($this->_handle = $this->_openSocket($host, $port, $error_number, $error, $timeout))) { |
|
| 91 | 91 | $this->_setError("Cannot open [$host:$port] with [$error] within [$timeout] seconds"); |
| 92 | 92 | return; |
| 93 | 93 | } |
@@ -103,11 +103,11 @@ discard block |
||
| 103 | 103 | * @access public |
| 104 | 104 | */ |
| 105 | 105 | function write($message) { |
| 106 | - if ($this->isError() || ! $this->isOpen()) { |
|
| 106 | + if ($this->isError() || !$this->isOpen()) { |
|
| 107 | 107 | return false; |
| 108 | 108 | } |
| 109 | 109 | $count = fwrite($this->_handle, $message); |
| 110 | - if (! $count) { |
|
| 110 | + if (!$count) { |
|
| 111 | 111 | if ($count === false) { |
| 112 | 112 | $this->_setError('Cannot write to socket'); |
| 113 | 113 | $this->close(); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | * @access public |
| 129 | 129 | */ |
| 130 | 130 | function read() { |
| 131 | - if ($this->isError() || ! $this->isOpen()) { |
|
| 131 | + if ($this->isError() || !$this->isOpen()) { |
|
| 132 | 132 | return false; |
| 133 | 133 | } |
| 134 | 134 | $raw = @fread($this->_handle, $this->_block_size); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | require_once(dirname(__FILE__) . '/scorer.php'); |
| 17 | 17 | require_once(dirname(__FILE__) . '/expectation.php'); |
| 18 | 18 | require_once(dirname(__FILE__) . '/dumper.php'); |
| 19 | - if (! defined('SIMPLE_TEST')) { |
|
| 19 | + if (!defined('SIMPLE_TEST')) { |
|
| 20 | 20 | define('SIMPLE_TEST', dirname(__FILE__) . '/'); |
| 21 | 21 | } |
| 22 | 22 | /**#@-*/ |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | * @access public |
| 188 | 188 | */ |
| 189 | 189 | function assertTrue($result, $message = false) { |
| 190 | - if (! $message) { |
|
| 190 | + if (!$message) { |
|
| 191 | 191 | $message = 'True assertion got ' . ($result ? 'True' : 'False'); |
| 192 | 192 | } |
| 193 | 193 | if ($result) { |
@@ -210,10 +210,10 @@ discard block |
||
| 210 | 210 | * @access public |
| 211 | 211 | */ |
| 212 | 212 | function assertFalse($result, $message = false) { |
| 213 | - if (! $message) { |
|
| 213 | + if (!$message) { |
|
| 214 | 214 | $message = 'False assertion got ' . ($result ? 'True' : 'False'); |
| 215 | 215 | } |
| 216 | - return $this->assertTrue(! $result, $message); |
|
| 216 | + return $this->assertTrue(!$result, $message); |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | /** |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | if (in_array($class, $existing_classes)) { |
| 417 | 417 | continue; |
| 418 | 418 | } |
| 419 | - if (! $this->_isTestCase($class)) { |
|
| 419 | + if (!$this->_isTestCase($class)) { |
|
| 420 | 420 | continue; |
| 421 | 421 | } |
| 422 | 422 | $classes[] = $class; |