Skip to content

Commit

Permalink
Merge pull request #4593 from cakephp/issue-4592
Browse files Browse the repository at this point in the history
Make bake generate IntegrationTestCases.
  • Loading branch information
lorenzo committed Sep 13, 2014
2 parents 6f25e4a + 2a656c7 commit 6f0347f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Template/Bake/default/classes/test.ctp
Expand Up @@ -25,7 +25,7 @@ namespace <?= $baseNamespace; ?>\Test\TestCase\<?= $subNamespace ?>;
use <?= $dependency; ?>;
<?php endforeach; ?>
<?php if ($isController): ?>
use Cake\TestSuite\ControllerTestCase;
use Cake\TestSuite\IntegrationTestCase;
<?php else: ?>
use Cake\TestSuite\TestCase;
<?php endif; ?>
Expand All @@ -34,7 +34,7 @@ use Cake\TestSuite\TestCase;
* <?= $fullClassName ?> Test Case
*/
<?php if ($isController): ?>
class <?= $className ?>Test extends ControllerTestCase {
class <?= $className ?>Test extends IntegrationTestCase {
<?php else: ?>
class <?= $className ?>Test extends TestCase {
<?php endif; ?>
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Shell/Task/TestTaskTest.php
Expand Up @@ -385,7 +385,7 @@ public function testBakeControllerTest() {
$result = $this->Task->bake('Controller', 'PostsController');

$this->assertContains("use TestApp\Controller\PostsController", $result);
$this->assertContains('class PostsControllerTest extends ControllerTestCase', $result);
$this->assertContains('class PostsControllerTest extends IntegrationTestCase', $result);

$this->assertNotContains('function setUp()', $result);
$this->assertNotContains("\$this->Posts = new PostsController()", $result);
Expand Down Expand Up @@ -413,7 +413,7 @@ public function testBakePrefixControllerTest() {
$result = $this->Task->bake('controller', 'Admin\Posts');

$this->assertContains("use TestApp\Controller\Admin\PostsController", $result);
$this->assertContains('class PostsControllerTest extends ControllerTestCase', $result);
$this->assertContains('class PostsControllerTest extends IntegrationTestCase', $result);

$this->assertNotContains('function setUp()', $result);
$this->assertNotContains("\$this->Posts = new PostsController()", $result);
Expand Down

0 comments on commit 6f0347f

Please sign in to comment.