From bfdc41e8bb90c2dc9e42e801eb2ad38d51cfaa69 Mon Sep 17 00:00:00 2001 From: Brian Porter Date: Thu, 5 Dec 2013 22:54:26 -0600 Subject: [PATCH] Baked test methods are marked incomplete. Previously empty (and "passing") test methods now include PHPunit's `markTestIncomplete()` to better reflect the truth of the resulting file: The test methods are stubbed out, but are not yet complete and passing. It is much easier when _running_ tests to locate incomplete test methods. Fixes 2437. --- lib/Cake/Console/Templates/default/classes/test.ctp | 1 + lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/Cake/Console/Templates/default/classes/test.ctp b/lib/Cake/Console/Templates/default/classes/test.ctp index 7e3d3488d..8e249f4f2 100644 --- a/lib/Cake/Console/Templates/default/classes/test.ctp +++ b/lib/Cake/Console/Templates/default/classes/test.ctp @@ -75,6 +75,7 @@ class Test extends CakeTestCase { * @return void */ public function test() { + $this->markTestIncomplete('test not implemented.'); } diff --git a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php index 07982c22d..ebca0537f 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php @@ -413,6 +413,8 @@ class TestTaskTest extends CakeTestCase { $this->assertContains('function testDoSomething()', $result); $this->assertContains('function testDoSomethingElse()', $result); + $this->assertContains('$this->markTestIncomplete(\'testDoSomething not implemented.\')', $result); + $this->assertContains('$this->markTestIncomplete(\'testDoSomethingElse not implemented.\')', $result); $this->assertContains("'app.test_task_article'", $result); $this->assertContains("'app.test_task_comment'", $result);