public function CoreComposerValidatorTest::testCoreNotRequired in Automatic Updates 8.2
Tests that an error is raised if core is not required in composer.json.
File
- tests/
src/ Kernel/ ReadinessValidation/ CoreComposerValidatorTest.php, line 37
Class
Namespace
Drupal\Tests\automatic_updates\Kernel\ReadinessValidationCode
public function testCoreNotRequired() : void {
// Point to a valid composer.json with no requirements.
$locator = $this
->prophesize(PathLocator::class);
$locator
->getActiveDirectory()
->willReturn(__DIR__ . '/../../../fixtures/project_staged_validation/no_core_requirements');
$this->container
->set('automatic_updates.path_locator', $locator
->reveal());
$error = ValidationResult::createError([
'Drupal core does not appear to be required in the project-level composer.json.',
]);
$this
->assertCheckerResultsFromManager([
$error,
], TRUE);
}