mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix coding standards.
This commit is contained in:
parent
7798914676
commit
480c1bbb54
3 changed files with 23 additions and 30 deletions
|
@ -51,7 +51,7 @@ class AllTests extends PHPUnit_Framework_TestSuite {
|
|||
$suite->addTestFile($path . 'Model' . DS . 'ModelTest.php');
|
||||
$suite->addTestFile($path . 'AllRoutingTest.php');
|
||||
$suite->addTestFile($path . 'AllNetworkTest.php');
|
||||
$suite->addTestFile($path . 'AllTestSuiteTest.php');;
|
||||
$suite->addTestFile($path . 'AllTestSuiteTest.php');
|
||||
$suite->addTestFile($path . 'AllUtilityTest.php');
|
||||
$suite->addTestFile($path . 'AllViewTest.php');
|
||||
$suite->addTestFile($path . 'AllI18nTest.php');
|
||||
|
|
|
@ -685,7 +685,7 @@ class BasicsTest extends CakeTestCase {
|
|||
ob_start();
|
||||
debug('this-is-a-test', false);
|
||||
$result = ob_get_clean();
|
||||
$expectedText = <<<EXPECTED
|
||||
$expectedText = <<<EXPECTED
|
||||
%s (line %d)
|
||||
########## DEBUG ##########
|
||||
'this-is-a-test'
|
||||
|
@ -697,7 +697,7 @@ EXPECTED;
|
|||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', true);
|
||||
$result = ob_get_clean();
|
||||
$expectedHtml = <<<EXPECTED
|
||||
$expectedHtml = <<<EXPECTED
|
||||
<div class="cake-debug-output">
|
||||
<span><strong>%s</strong> (line <strong>%d</strong>)</span>
|
||||
<pre class="cake-debug">
|
||||
|
@ -709,9 +709,9 @@ EXPECTED;
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', true, true);
|
||||
debug('<div>this-is-a-test</div>', true, true);
|
||||
$result = ob_get_clean();
|
||||
$expected = <<<EXPECTED
|
||||
$expected = <<<EXPECTED
|
||||
<div class="cake-debug-output">
|
||||
<span><strong>%s</strong> (line <strong>%d</strong>)</span>
|
||||
<pre class="cake-debug">
|
||||
|
@ -723,9 +723,9 @@ EXPECTED;
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', true, false);
|
||||
debug('<div>this-is-a-test</div>', true, false);
|
||||
$result = ob_get_clean();
|
||||
$expected = <<<EXPECTED
|
||||
$expected = <<<EXPECTED
|
||||
<div class="cake-debug-output">
|
||||
|
||||
<pre class="cake-debug">
|
||||
|
@ -737,9 +737,9 @@ EXPECTED;
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', null);
|
||||
debug('<div>this-is-a-test</div>', null);
|
||||
$result = ob_get_clean();
|
||||
$expectedHtml = <<<EXPECTED
|
||||
$expectedHtml = <<<EXPECTED
|
||||
<div class="cake-debug-output">
|
||||
<span><strong>%s</strong> (line <strong>%d</strong>)</span>
|
||||
<pre class="cake-debug">
|
||||
|
@ -747,7 +747,7 @@ $expectedHtml = <<<EXPECTED
|
|||
</pre>
|
||||
</div>
|
||||
EXPECTED;
|
||||
$expectedText = <<<EXPECTED
|
||||
$expectedText = <<<EXPECTED
|
||||
%s (line %d)
|
||||
########## DEBUG ##########
|
||||
'<div>this-is-a-test</div>'
|
||||
|
@ -761,9 +761,9 @@ EXPECTED;
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', null, false);
|
||||
debug('<div>this-is-a-test</div>', null, false);
|
||||
$result = ob_get_clean();
|
||||
$expectedHtml = <<<EXPECTED
|
||||
$expectedHtml = <<<EXPECTED
|
||||
<div class="cake-debug-output">
|
||||
|
||||
<pre class="cake-debug">
|
||||
|
@ -771,7 +771,7 @@ $expectedHtml = <<<EXPECTED
|
|||
</pre>
|
||||
</div>
|
||||
EXPECTED;
|
||||
$expectedText = <<<EXPECTED
|
||||
$expectedText = <<<EXPECTED
|
||||
|
||||
########## DEBUG ##########
|
||||
'<div>this-is-a-test</div>'
|
||||
|
@ -785,9 +785,9 @@ EXPECTED;
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', false);
|
||||
debug('<div>this-is-a-test</div>', false);
|
||||
$result = ob_get_clean();
|
||||
$expected = <<<EXPECTED
|
||||
$expected = <<<EXPECTED
|
||||
%s (line %d)
|
||||
########## DEBUG ##########
|
||||
'<div>this-is-a-test</div>'
|
||||
|
@ -797,9 +797,9 @@ EXPECTED;
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', false, true);
|
||||
debug('<div>this-is-a-test</div>', false, true);
|
||||
$result = ob_get_clean();
|
||||
$expected = <<<EXPECTED
|
||||
$expected = <<<EXPECTED
|
||||
%s (line %d)
|
||||
########## DEBUG ##########
|
||||
'<div>this-is-a-test</div>'
|
||||
|
@ -809,9 +809,9 @@ EXPECTED;
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
ob_start();
|
||||
debug('<div>this-is-a-test</div>', false, false);
|
||||
debug('<div>this-is-a-test</div>', false, false);
|
||||
$result = ob_get_clean();
|
||||
$expected = <<<EXPECTED
|
||||
$expected = <<<EXPECTED
|
||||
|
||||
########## DEBUG ##########
|
||||
'<div>this-is-a-test</div>'
|
||||
|
@ -828,13 +828,13 @@ EXPECTED;
|
|||
*/
|
||||
public function testPr() {
|
||||
ob_start();
|
||||
pr('this is a test');
|
||||
pr('this is a test');
|
||||
$result = ob_get_clean();
|
||||
$expected = "<pre>this is a test</pre>";
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
ob_start();
|
||||
pr(array('this' => 'is', 'a' => 'test'));
|
||||
pr(array('this' => 'is', 'a' => 'test'));
|
||||
$result = ob_get_clean();
|
||||
$expected = "<pre>Array\n(\n [this] => is\n [a] => test\n)\n</pre>";
|
||||
$this->assertEquals($expected, $result);
|
||||
|
|
|
@ -27,6 +27,7 @@ class MockPDO extends PDO {
|
|||
|
||||
public function __construct() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class MockDataSource extends DataSource {
|
||||
|
@ -49,6 +50,7 @@ class DboTestSource extends DboSource {
|
|||
public function setConnection($conn) {
|
||||
$this->_connection = $conn;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -109,7 +111,6 @@ class DboSourceTest extends CakeTestCase {
|
|||
unset($this->Model);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* test that booleans and null make logical condition strings.
|
||||
*
|
||||
|
@ -420,7 +421,6 @@ class DboSourceTest extends CakeTestCase {
|
|||
$this->assertEquals($data, $expected);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* testMagicMethodQuerying method
|
||||
*
|
||||
|
@ -492,7 +492,6 @@ class DboSourceTest extends CakeTestCase {
|
|||
$result = $this->db->query('directCall', array(), $this->Model);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* testValue method
|
||||
*
|
||||
|
@ -659,7 +658,6 @@ class DboSourceTest extends CakeTestCase {
|
|||
$expected = array('query' => 'Error 1', 'affected' => '', 'numRows' => '', 'took' => '');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* test getting the query log as an array, setting bind params.
|
||||
*
|
||||
|
@ -676,7 +674,6 @@ class DboSourceTest extends CakeTestCase {
|
|||
$this->assertEquals($log['log'][1], $expected);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* test that query() returns boolean values from operations like CREATE TABLE
|
||||
*
|
||||
|
@ -693,7 +690,6 @@ class DboSourceTest extends CakeTestCase {
|
|||
$this->assertTrue($result, 'Query did not return a boolean');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* test order to generate query order clause for virtual fields
|
||||
*
|
||||
|
@ -716,8 +712,6 @@ class DboSourceTest extends CakeTestCase {
|
|||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* test the permutations of fullTableName()
|
||||
*
|
||||
|
@ -784,7 +778,6 @@ class DboSourceTest extends CakeTestCase {
|
|||
$this->assertTrue(empty(DboTestSource::$methodCache['fields']), 'Cache not empty');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test that group works without a model
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue