Skip to content

Commit 4994519

Browse files
committed
minor #1774 [make:crud] Ensure the generated functional tests run in MakerBundle's CI (GromNaN)
This PR was merged into the 1.x branch. Discussion ---------- [make:crud] Ensure the generated functional tests run in MakerBundle's CI In order to ensure there is no regression in the generated test case (#1773), they must be run in MakerBundle's CI. The `markTestIncomplete` call stops the execution by throwing and exception. Skipping all the test body. By moving this call at the end of the method, the tests are fully run. I even wonder if marking tests as incomplete serves any purpose. For reference, this was added in #307, this point was not discussed. Commits ------- 69e911a [make:crud] Move markTestIncomplete at the end to ensure the test is run in MakerBundle CI
2 parents 1b96b0e + 69e911a commit 4994519

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

templates/crud/test/Test.EntityManager.tpl.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public function testIndex(): void
4040

4141
public function testNew(): void
4242
{
43-
$this->markTestIncomplete();
4443
$this->client->request('GET', sprintf('%snew', $this->path));
4544

4645
self::assertResponseStatusCodeSame(200);
@@ -54,11 +53,12 @@ public function testNew(): void
5453
self::assertResponseRedirects('<?= $route_path; ?>');
5554

5655
self::assertSame(1, $this-><?= lcfirst($entity_var_singular); ?>Repository->count([]));
56+
57+
$this->markTestIncomplete('This test was generated');
5758
}
5859

5960
public function testShow(): void
6061
{
61-
$this->markTestIncomplete();
6262
$fixture = new <?= $entity_class_name; ?>();
6363
<?php foreach ($form_fields as $form_field => $typeOptions): ?>
6464
$fixture->set<?= Str::asCamelCase($form_field); ?>('My Title');
@@ -73,11 +73,11 @@ public function testShow(): void
7373
self::assertPageTitleContains('<?= ucfirst($entity_var_singular); ?>');
7474

7575
// Use assertions to check that the properties are properly displayed.
76+
$this->markTestIncomplete('This test was generated');
7677
}
7778

7879
public function testEdit(): void
7980
{
80-
$this->markTestIncomplete();
8181
$fixture = new <?= $entity_class_name; ?>();
8282
<?php foreach ($form_fields as $form_field => $typeOptions): ?>
8383
$fixture->set<?= Str::asCamelCase($form_field); ?>('Value');
@@ -101,11 +101,12 @@ public function testEdit(): void
101101
<?php foreach ($form_fields as $form_field => $typeOptions): ?>
102102
self::assertSame('Something New', $fixture[0]->get<?= Str::asCamelCase($form_field); ?>());
103103
<?php endforeach; ?>
104+
105+
$this->markTestIncomplete('This test was generated');
104106
}
105107

106108
public function testRemove(): void
107109
{
108-
$this->markTestIncomplete();
109110
$fixture = new <?= $entity_class_name; ?>();
110111
<?php foreach ($form_fields as $form_field => $typeOptions): ?>
111112
$fixture->set<?= Str::asCamelCase($form_field); ?>('Value');
@@ -119,5 +120,7 @@ public function testRemove(): void
119120

120121
self::assertResponseRedirects('<?= $route_path; ?>');
121122
self::assertSame(0, $this-><?= lcfirst($entity_var_singular); ?>Repository->count([]));
123+
124+
$this->markTestIncomplete('This test was generated');
122125
}
123126
}

0 commit comments

Comments
 (0)