mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fix tests for cli runner.
This commit is contained in:
parent
b0280b27b1
commit
15d01bf901
1 changed files with 21 additions and 0 deletions
|
@ -853,6 +853,7 @@ EXPECTED;
|
|||
* @return void
|
||||
*/
|
||||
public function testPr() {
|
||||
$this->skipIf(php_sapi_name() == 'cli', 'Skipping web test in cli mode');
|
||||
ob_start();
|
||||
pr('this is a test');
|
||||
$result = ob_get_clean();
|
||||
|
@ -866,6 +867,26 @@ EXPECTED;
|
|||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* test pr()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testPrCli() {
|
||||
$this->skipIf(php_sapi_name() != 'cli', 'Skipping cli test in web mode');
|
||||
ob_start();
|
||||
pr('this is a test');
|
||||
$result = ob_get_clean();
|
||||
$expected = "\nthis is a test\n";
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
ob_start();
|
||||
pr(array('this' => 'is', 'a' => 'test'));
|
||||
$result = ob_get_clean();
|
||||
$expected = "\nArray\n(\n [this] => is\n [a] => test\n)\n\n";
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* test stripslashes_deep()
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue