| Total Complexity | 3 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class FeatureContext extends BaseFeatureContext |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @Then /^I should( not |\s+)see the thumbnail image for block (\d+)$/i |
||
| 11 | * |
||
| 12 | * @param string $negative |
||
| 13 | * @param int $position |
||
| 14 | * |
||
| 15 | */ |
||
| 16 | public function iShouldSeeTheThumbnailImageForBlock($negative, $position) |
||
| 17 | { |
||
| 18 | $iShouldNotSee = $negative === ' not '; |
||
| 19 | |||
| 20 | $thumbnailImage = $this->findThumbnailImage($position); |
||
| 21 | |||
| 22 | if ($iShouldNotSee) { |
||
| 23 | assertNull($thumbnailImage, 'Thumbnail image displayed (but shouldn\'t)'); |
||
| 24 | } else { |
||
| 25 | assertNotNull($thumbnailImage, 'Thumbnail image not displayed (but should be)'); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 29 | |||
| 30 | /** |
||
| 31 | * Returns the thumbnail image for a specific block if it exists |
||
| 32 | * |
||
| 33 | * @param int $position |
||
| 34 | * @return NodeElement|null |
||
| 35 | */ |
||
| 36 | protected function findThumbnailImage($position) |
||
| 47 | } |
||
| 48 | } |
||
| 49 |
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