Skip to content

Commit

Permalink
Cleanup testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Jul 18, 2016
1 parent 019503e commit 9138dbc
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tests/TestCase/View/CsvViewTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
namespace CsvView\Test\TestCase\View;

use Cake\Controller\Controller;
use Cake\I18n\Time;
use Cake\Network\Request;
use Cake\Network\Response;
Expand Down Expand Up @@ -54,7 +53,6 @@ public function testRenderWithoutViewMultiple()
[1, 2, 3],
['you', 'and', 'me'],
];
$_serialize = 'data';
$this->view->set('data', $data);
$this->view->set(['_serialize' => 'data']);
$output = $this->view->render(false);
Expand All @@ -80,7 +78,6 @@ public function testRenderWithCustomEol()
[1, 2, 3],
['you', 'and', 'me'],
];
$_serialize = 'data';
$this->view->set('data', $data);
$this->view->set(['_serialize' => 'data']);
$this->view->viewVars['_eol'] = '~';
Expand All @@ -102,7 +99,6 @@ public function testRenderWithCustomEncoding()
[1, 2, 3],
['あなた', 'と', '私'],
];
$_serialize = 'data';
$this->view->set('data', $data);
$this->view->set(['_serialize' => 'data']);
$this->view->viewVars['_dataEncoding'] = 'UTF-8';
Expand Down Expand Up @@ -132,7 +128,6 @@ public function testRenderWithMbstring()
[1, 2, 3],
['あなた', 'と', '私'],
];
$_serialize = 'data';
$this->view->set('data', $data);
$this->view->set(['_serialize' => 'data']);
$this->view->viewVars['_dataEncoding'] = 'UTF-8';
Expand Down Expand Up @@ -328,8 +323,6 @@ public function testPassingQueryAsData()
*/
public function testRenderEnclosure()
{
$Request = new Request();
$Response = new Response();
$data = [['user', 'fake apple', 'list', 'a b c', 'item2']];
$testData = [
'"' => 'user,"fake apple",list,"a b c",item2' . PHP_EOL,
Expand All @@ -338,7 +331,6 @@ public function testRenderEnclosure()
];

foreach ($testData as $enclosure => $expected) {
$_serialize = 'data';
$this->view->set('data', $data);
$this->view->set(['_serialize' => 'data']);
$this->view->viewVars['_enclosure'] = $enclosure;
Expand All @@ -361,7 +353,6 @@ public function testRenderWithCustomNull()
[1, 2, null],
['you', null, 'me'],
];
$_serialize = 'data';
$this->view->set('data', $data);
$this->view->set(['_serialize' => 'data']);
$this->view->viewVars['_null'] = 'NULL';
Expand All @@ -381,6 +372,6 @@ public function testRenderWithCustomNull()
public function testInvalidViewVarThrowsException()
{
$this->view->set(['data' => 'invaliddata', '_serialize' => 'data']);
$output = $this->view->render(false);
$this->view->render(false);
}
}

0 comments on commit 9138dbc

Please sign in to comment.