Skip to content

Commit

Permalink
Fix coding standards.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 18, 2012
1 parent 7798914 commit 480c1bb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 30 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/AllTestsTest.php
Expand Up @@ -51,7 +51,7 @@ public static function suite() {
$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');
Expand Down
40 changes: 20 additions & 20 deletions lib/Cake/Test/Case/BasicsTest.php
Expand Up @@ -685,7 +685,7 @@ public function testDebug() {
ob_start();
debug('this-is-a-test', false);
$result = ob_get_clean();
$expectedText = <<<EXPECTED
$expectedText = <<<EXPECTED
%s (line %d)
########## DEBUG ##########
'this-is-a-test'
Expand All @@ -697,7 +697,7 @@ public function testDebug() {
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">
Expand All @@ -709,9 +709,9 @@ public function testDebug() {
$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">
Expand All @@ -723,9 +723,9 @@ public function testDebug() {
$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">
Expand All @@ -737,17 +737,17 @@ public function testDebug() {
$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">
&#039;&lt;div&gt;this-is-a-test&lt;/div&gt;&#039;
</pre>
</div>
EXPECTED;
$expectedText = <<<EXPECTED
$expectedText = <<<EXPECTED
%s (line %d)
########## DEBUG ##########
'<div>this-is-a-test</div>'
Expand All @@ -761,17 +761,17 @@ public function testDebug() {
$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">
&#039;&lt;div&gt;this-is-a-test&lt;/div&gt;&#039;
</pre>
</div>
EXPECTED;
$expectedText = <<<EXPECTED
$expectedText = <<<EXPECTED
########## DEBUG ##########
'<div>this-is-a-test</div>'
Expand All @@ -785,9 +785,9 @@ public function testDebug() {
$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>'
Expand All @@ -797,9 +797,9 @@ public function testDebug() {
$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>'
Expand All @@ -809,9 +809,9 @@ public function testDebug() {
$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>'
Expand All @@ -828,13 +828,13 @@ public function testDebug() {
*/
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);
Expand Down
11 changes: 2 additions & 9 deletions lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php
Expand Up @@ -27,6 +27,7 @@ class MockPDO extends PDO {

public function __construct() {
}

}

class MockDataSource extends DataSource {
Expand All @@ -49,6 +50,7 @@ public function setConfig($config = array()) {
public function setConnection($conn) {
$this->_connection = $conn;
}

}

/**
Expand Down Expand Up @@ -109,7 +111,6 @@ public function tearDown() {
unset($this->Model);
}


/**
* test that booleans and null make logical condition strings.
*
Expand Down Expand Up @@ -420,7 +421,6 @@ public function testMergeAssociations() {
$this->assertEquals($data, $expected);
}


/**
* testMagicMethodQuerying method
*
Expand Down Expand Up @@ -492,7 +492,6 @@ public function testDirectCallThrowsException() {
$result = $this->db->query('directCall', array(), $this->Model);
}


/**
* testValue method
*
Expand Down Expand Up @@ -659,7 +658,6 @@ public function testGetLog() {
$expected = array('query' => 'Error 1', 'affected' => '', 'numRows' => '', 'took' => '');
}


/**
* test getting the query log as an array, setting bind params.
*
Expand All @@ -676,7 +674,6 @@ public function testGetLogParams() {
$this->assertEquals($log['log'][1], $expected);
}


/**
* test that query() returns boolean values from operations like CREATE TABLE
*
Expand All @@ -693,7 +690,6 @@ public function testFetchAllBooleanReturns() {
$this->assertTrue($result, 'Query did not return a boolean');
}


/**
* test order to generate query order clause for virtual fields
*
Expand All @@ -716,8 +712,6 @@ public function testVirtualFieldsInOrder() {
$this->assertEquals($expected, $result);
}



/**
* test the permutations of fullTableName()
*
Expand Down Expand Up @@ -784,7 +778,6 @@ public function testFieldsUsingMethodCache() {
$this->assertTrue(empty(DboTestSource::$methodCache['fields']), 'Cache not empty');
}


/**
* Test that group works without a model
*
Expand Down

0 comments on commit 480c1bb

Please sign in to comment.