| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function testOnlyCreateContactFormOnce() |
||
| 11 | { |
||
| 12 | $createdMessage = 'Created "contact" UserDefinedForm'; |
||
| 13 | |||
| 14 | $task = new PopulateThemeSampleDataTask; |
||
| 15 | |||
| 16 | // Run the task |
||
| 17 | $this->assertContains($createdMessage, $this->bufferedTask($task)); |
||
| 18 | |||
| 19 | // Run a second time |
||
| 20 | $this->assertNotContains($createdMessage, $this->bufferedTask($task)); |
||
| 21 | |||
| 22 | // Change the page name |
||
| 23 | $form = UserDefinedForm::get()->filter('URLSegment', 'contact')->first(); |
||
|
|
|||
| 24 | $form->URLSegment = 'testing'; |
||
| 25 | $form->write(); |
||
| 26 | |||
| 27 | // Ensure the old version is still detected in draft, so not recreated |
||
| 28 | $this->assertNotContains($createdMessage, $this->bufferedTask($task)); |
||
| 29 | |||
| 30 | // Delete the page, then ensure it's recreated again (DataObject::delete will remove staged versions) |
||
| 31 | $form->delete(); |
||
| 32 | $this->assertContains($createdMessage, $this->bufferedTask($task)); |
||
| 33 | } |
||
| 48 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths