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.
This commit is contained in:
Brian Porter 2013-12-05 22:54:26 -06:00
parent 8578708e76
commit bfdc41e8bb
2 changed files with 3 additions and 0 deletions

View file

@ -75,6 +75,7 @@ class <?php echo $fullClassName; ?>Test extends CakeTestCase {
* @return void * @return void
*/ */
public function test<?php echo Inflector::camelize($method); ?>() { public function test<?php echo Inflector::camelize($method); ?>() {
$this->markTestIncomplete('test<?php echo Inflector::camelize($method); ?> not implemented.');
} }
<?php endforeach; ?> <?php endforeach; ?>

View file

@ -413,6 +413,8 @@ class TestTaskTest extends CakeTestCase {
$this->assertContains('function testDoSomething()', $result); $this->assertContains('function testDoSomething()', $result);
$this->assertContains('function testDoSomethingElse()', $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_article'", $result);
$this->assertContains("'app.test_task_comment'", $result); $this->assertContains("'app.test_task_comment'", $result);