function TemplateProjectTestBase::assertRequestedChangesWereLogged
Asserts changes requested during the stage life cycle were logged.
This method specifically asserts changes that were *requested* (i.e., during the require phase) rather than changes that were actually applied. The requested and applied changes may be exactly the same, or they may differ (for example, if a secondary dependency was added or updated in the stage directory).
Parameters
string[] $expected_requested_changes: The expected requested changes.
See also
::assertAppliedChangesWereLogged()
\Drupal\package_manager\EventSubscriber\ChangeLogger
2 calls to TemplateProjectTestBase::assertRequestedChangesWereLogged()
- PackageInstallTest::testPackageInstall in core/
modules/ package_manager/ tests/ src/ Build/ PackageInstallTest.php - Tests installing packages in a stage directory.
- PackageUpdateTest::testPackageUpdate in core/
modules/ package_manager/ tests/ src/ Build/ PackageUpdateTest.php - Tests updating packages in a stage directory.
File
-
core/
modules/ package_manager/ tests/ src/ Build/ TemplateProjectTestBase.php, line 668
Class
- TemplateProjectTestBase
- Base class for tests which create a test site from a core project template.
Namespace
Drupal\Tests\package_manager\BuildCode
protected function assertRequestedChangesWereLogged(array $expected_requested_changes) : void {
$this->visitPackageManagerChangeLog();
$assert_session = $this->getMink()
->assertSession();
$assert_session->elementExists('css', 'a[href*="/admin/reports/dblog/event/"]:contains("Requested changes:")')
->click();
array_walk($expected_requested_changes, $assert_session->pageTextContains(...));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.