CakePHP1.2 SimpleTest でテストケースを作成する ではモデルのテストケースを作成したので今度はコントローラのテストケースを作成してみました。 コントローラのテストケースは app/tests/case/conrollers 以下に作成します。 app/tests/case/conrollers/user_controller.test.php <?php class UsersControllerTestCase extends CakeTestCase { function testIndexTitle() { $result = $this->testAction('/users/index', array('return'=>'render')); $this->assertPattern("/<title>TITLE<\/title>/", $result);