private function StagedProjectsValidatorTest::createEvent in Automatic Updates 8.2
Creates a pre-commit event object for testing.
Parameters
string $active_dir: The active directory.
string $stage_dir: The stage directory.
Return value
\Drupal\automatic_updates\Event\PreCommitEvent The event object.
3 calls to StagedProjectsValidatorTest::createEvent()
- StagedProjectsValidatorTest::testErrors in tests/
src/ Unit/ StagedProjectsValidatorTest.php - Tests validations errors.
- StagedProjectsValidatorTest::testNoErrors in tests/
src/ Unit/ StagedProjectsValidatorTest.php - Tests validation when there are no errors.
- StagedProjectsValidatorTest::testNoLockFile in tests/
src/ Unit/ StagedProjectsValidatorTest.php - Tests validation when a composer.lock file is not found.
File
- tests/
src/ Unit/ StagedProjectsValidatorTest.php, line 31
Class
- StagedProjectsValidatorTest
- @coversDefaultClass \Drupal\automatic_updates\Validator\StagedProjectsValidator
Namespace
Drupal\Tests\automatic_updates\UnitCode
private function createEvent(string $active_dir, string $stage_dir) : PreCommitEvent {
return new PreCommitEvent(ComposerUtility::createForDirectory($active_dir), ComposerUtility::createForDirectory($stage_dir));
}