private function ContentPublishingFormTest::assertFormAccessibitlity in Acquia Lift Connector 8.4
Asserts if form is reachable for the given user.
Parameters
\Drupal\user\UserInterface $user: The current user.
int $expected: The expected status code.
string $message: The message to display in case of the failing test.
1 call to ContentPublishingFormTest::assertFormAccessibitlity()
- ContentPublishingFormTest::testFormAccessibility in modules/
acquia_lift_publisher/ tests/ src/ Functional/ ContentPublishingFormTest.php - Tests form route and the rendered fields.
File
- modules/
acquia_lift_publisher/ tests/ src/ Functional/ ContentPublishingFormTest.php, line 82
Class
- ContentPublishingFormTest
- Tests basic form elements of ContentPublishingForm.
Namespace
Drupal\Tests\acquia_lift_publisher\FunctionalCode
private function assertFormAccessibitlity(UserInterface $user, int $expected, string $message) : void {
$this
->drupalLogin($user);
$session = $this
->getSession();
$this
->drupalGet(Url::fromRoute('acquia_lift_publisher.entity_config_form'));
$this
->assertEqual($session
->getStatusCode(), $expected, $message);
}