Skip to content

Commit

Permalink
Fix most coding standards in Case/Network
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 17, 2012
1 parent 544930f commit d0733ce
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 117 deletions.
16 changes: 5 additions & 11 deletions lib/Cake/Test/Case/Network/CakeRequestTest.php
Expand Up @@ -22,6 +22,7 @@
App::uses('CakeRequest', 'Network');

class CakeRequestTest extends CakeTestCase {

/**
* setup callback
*
Expand Down Expand Up @@ -106,7 +107,6 @@ public function testQueryStringParsingFromInputUrl() {
$expected = array('one' => 'something', 'two' => 'else');
$this->assertEquals($expected, $request->query);
$this->assertEquals('some/path?one=something&two=else', $request->url);

}

/**
Expand Down Expand Up @@ -161,7 +161,6 @@ public function testAddPaths() {
$this->assertFalse(isset($request->random));
}


/**
* test parsing POST data into the object.
*
Expand Down Expand Up @@ -437,7 +436,6 @@ public function testFILESParsing() {
);
$this->assertEquals($request->data, $expected);


$_FILES = array(
'data' => array(
'name' => array('birth_cert' => 'born on.txt'),
Expand Down Expand Up @@ -471,7 +469,6 @@ public function testFILESParsing() {
);
$request = new CakeRequest('some/path');
$this->assertEquals($request->params['form'], $_FILES);

}

/**
Expand Down Expand Up @@ -682,7 +679,7 @@ public function testisAjaxFlashAndFriends() {
* @expectedException CakeException
* @return void
*/
public function test__callExceptionOnUnknownMethod() {
public function testMagicCallExceptionOnUnknownMethod() {
$request = new CakeRequest('some/path');
$request->IamABanana();
}
Expand Down Expand Up @@ -725,7 +722,7 @@ public function testIsSsl() {
*
* @return void
*/
public function test__get() {
public function testMagicget() {
$request = new CakeRequest('some/path');
$request->params = array('controller' => 'posts', 'action' => 'view', 'plugin' => 'blogs');

Expand All @@ -740,7 +737,7 @@ public function test__get() {
*
* @return void
*/
public function test__isset() {
public function testMagicisset() {
$request = new CakeRequest('some/path');
$request->params = array(
'controller' => 'posts',
Expand Down Expand Up @@ -800,7 +797,7 @@ public function testAddDetector() {

$_SERVER['TEST_VAR'] = 'wrong';
$this->assertFalse($request->is('compare'), 'Value mis-match failed.');

$request->addDetector('compareCamelCase', array('env' => 'TEST_VAR', 'value' => 'foo'));

$_SERVER['TEST_VAR'] = 'foo';
Expand Down Expand Up @@ -945,7 +942,6 @@ public function testBaseUrlAndWebrootWithModRewrite() {
$this->assertEquals($request->webroot, '/1.2.x.x/');
$this->assertEquals($request->url, 'posts/view/1');


$_SERVER['DOCUMENT_ROOT'] = '/cake/repo/branches/1.2.x.x/app/webroot';
$_SERVER['PHP_SELF'] = '/index.php';
$_SERVER['PATH_INFO'] = '/posts/add';
Expand All @@ -962,7 +958,6 @@ public function testBaseUrlAndWebrootWithModRewrite() {
$this->assertEquals('', $request->base);
$this->assertEquals('/', $request->webroot);


$_SERVER['DOCUMENT_ROOT'] = '/some/apps/where';
$_SERVER['PHP_SELF'] = '/app/webroot/index.php';
$request = new CakeRequest();
Expand Down Expand Up @@ -1704,7 +1699,6 @@ public function testInputDecodeExtraParams() {
);
}


/**
* Test is('requested') and isRequested()
*
Expand Down

0 comments on commit d0733ce

Please sign in to comment.