bringyourownideas /
silverstripe-composer-security-checker
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace BringYourOwnIdeas\SecurityChecker\Tests\Extensions; |
||||
| 4 | |||||
| 5 | use BringYourOwnIdeas\Maintenance\Model\Package; |
||||
|
0 ignored issues
–
show
|
|||||
| 6 | use BringYourOwnIdeas\SecurityChecker\Models\SecurityAlert; |
||||
| 7 | use SilverStripe\Dev\SapphireTest; |
||||
| 8 | use Symbiote\QueuedJobs\Services\QueuedJobService; |
||||
| 9 | |||||
| 10 | class SecurityAlertExtensionTest extends SapphireTest |
||||
| 11 | { |
||||
| 12 | protected static $fixture_file = 'PackageSecurityExtensionTest.yml'; |
||||
| 13 | |||||
| 14 | protected function setUp() |
||||
| 15 | { |
||||
| 16 | if (!class_exists(Package::class)) { |
||||
| 17 | static::$fixture_file = null; |
||||
| 18 | parent::setUp(); |
||||
| 19 | $this->markTestSkipped( |
||||
| 20 | 'Module bringyourownideas/silverstripe-maintenance is required for this test, but is not present.' |
||||
| 21 | ); |
||||
| 22 | } |
||||
| 23 | |||||
| 24 | QueuedJobService::config()->set('use_shutdown_function', false); |
||||
| 25 | parent::setUp(); |
||||
| 26 | } |
||||
| 27 | |||||
| 28 | public function testExtensionAppliesWhenMaintenanceModuleIsPresent() |
||||
| 29 | { |
||||
| 30 | /** @var SecurityAlert $alert */ |
||||
| 31 | $alert = $this->objFromFixture(SecurityAlert::class, 'two'); |
||||
| 32 | |||||
| 33 | $this->assertTrue($alert->PackageRecord()->exists()); |
||||
|
0 ignored issues
–
show
The method
PackageRecord() does not exist on BringYourOwnIdeas\Securi...er\Models\SecurityAlert. Since you implemented __call, consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 34 | } |
||||
| 35 | } |
||||
| 36 |
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