Skip to content
Permalink
Browse files

General clean up

    Spelling corrections
    Missing assertions
    Unused variables
    etc
  • Loading branch information...
lilHermit committed Jan 26, 2017
1 parent f1878f0 commit 0ed746a1dcd87b3d5a91345488bde28c57c876f3
Showing with 10 additions and 12 deletions.
  1. +10 −12 tests/TestCase/View/Helper/FormHelperTest.php
@@ -400,7 +400,6 @@ public function contextSelectionProvider()
$entity = new Article();
$collection = new Collection([$entity]);
$emptyCollection = new Collection([]);
$emptyArray = [];
$arrayObject = new \ArrayObject([]);
$data = [
'schema' => [
@@ -896,7 +895,7 @@ public function testCreateWithAcceptCharset()
* Test base form URL when url param is passed with multiple parameters (&)
*
*/
public function testCreateQuerystringrequest()
public function testCreateQueryStringRequest()
{
$encoding = strtolower(Configure::read('App.encoding'));
$result = $this->Form->create($this->article, [
@@ -1087,7 +1086,6 @@ public function testCreateWithSecurity()
public function testCreateEndGetNoSecurity()
{
$this->Form->request->params['_csrfToken'] = 'testKey';
$encoding = strtolower(Configure::read('App.encoding'));
$article = new Article();
$result = $this->Form->create($article, [
'type' => 'get',
@@ -1471,7 +1469,6 @@ public function testSecuritySubmitNestedNamed()
*/
public function testSecuritySubmitImageNoName()
{
$key = 'testKey';
$this->Form->request->params['_Token'] = 'testKey';
$this->Form->create(false);
@@ -2406,18 +2403,18 @@ public function testSecuredFormUrlIgnoresHost()
}
/**
* testSecuredFormUrlHasHtmlAndIdentifer method
* testSecuredFormUrlHasHtmlAndIdentifier method
*
* Test that URL, HTML and identifer show up in their hashs.
* Test that URL, HTML and identifier show up in their hashes.
*
* @return void
*/
public function testSecuredFormUrlHasHtmlAndIdentifer()
public function testSecuredFormUrlHasHtmlAndIdentifier()
{
$this->Form->request['_Token'] = ['key' => 'testKey'];
$expected = 'ece0693fb1b19ca116133db1832ac29baaf41ce5%3A';
$res = $this->Form->create($this->article, [
$this->Form->create($this->article, [
'url' => [
'controller' => 'articles',
'action' => 'view',
@@ -3066,6 +3063,7 @@ public function testNestedInputsEndWithBrackets()
'type' => 'text', 'name' => 'nested[text][]'
],
];
$this->assertHtml($expected, $result);
$result = $this->Form->file('nested.file[]');
$expected = [
@@ -5408,7 +5406,7 @@ public function testSelectMultipleCheckboxSecurity()
$this->Form->request->params['_Token'] = 'testKey';
$this->assertEquals([], $this->Form->fields);
$result = $this->Form->select(
$this->Form->select(
'Model.multi_field',
['1' => 'first', '2' => 'second', '3' => 'third'],
['multiple' => 'checkbox']
@@ -5593,6 +5591,8 @@ public function testSelectCheckboxMultipleOverrideName()
new Collection(['1', '2']),
['name' => 'fish']
);
$this->assertHtml($expected, $result);
$result = $this->Form->multiCheckbox('category', ['1', '2'], [
'name' => 'fish',
]);
@@ -6043,7 +6043,6 @@ public function testDateTimeSecuredDisabled()
public function testDatetimeEmpty()
{
extract($this->dateRegex);
$now = strtotime('now');
$result = $this->Form->dateTime('Contact.date', [
'timeFormat' => 12,
@@ -6101,7 +6100,6 @@ public function testDatetimeEmpty()
public function testDatetimeMinuteInterval()
{
extract($this->dateRegex);
$now = strtotime('now');
$result = $this->Form->dateTime('Contact.date', [
'interval' => 5,
@@ -7867,7 +7865,7 @@ public function testDateTimeWithGetForms()
*/
public function testForMagicInputNonExistingNorValidated()
{
$result = $this->Form->create($this->article);
$this->Form->create($this->article);
$this->Form->templates(['inputContainer' => '{{content}}']);
$result = $this->Form->input('non_existing_nor_validated');
$expected = [

0 comments on commit 0ed746a

Please sign in to comment.
You can’t perform that action at this time.