protected function MediaRevisionsUiTest::assertRevisionsListStatusCode in Media Revisions UI 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/MediaRevisionsUiTest.php \Drupal\Tests\media_revisions_ui\Functional\MediaRevisionsUiTest::assertRevisionsListStatusCode()
Logs in a user, visits media revisions list page and asserts status code.
Parameters
\Drupal\user\Entity\User $user: User to log in.
\Drupal\Core\Entity\EntityInterface $media: Media from which to load revisions list.
int $expectedStatusCode: Expected status code when visiting revisions list.
2 calls to MediaRevisionsUiTest::assertRevisionsListStatusCode()
- MediaRevisionsUiTest::testRevert in tests/
src/ Functional/ MediaRevisionsUiTest.php - Tests reverting a revision.
- MediaRevisionsUiTest::testTabAccess in tests/
src/ Functional/ MediaRevisionsUiTest.php - Tests access to media revisions tab.
File
- tests/
src/ Functional/ MediaRevisionsUiTest.php, line 172
Class
- MediaRevisionsUiTest
- Tests media revisions UI.
Namespace
Drupal\Tests\media_revisions_ui\FunctionalCode
protected function assertRevisionsListStatusCode(User $user, EntityInterface $media, $expectedStatusCode) {
$this
->drupalLogin($user);
$this
->drupalGet("/media/{$media->id()}/revisions");
$this
->assertSession()
->statusCodeEquals($expectedStatusCode);
}