protected function MergeTermsTestBase::assertRedirect in Term Merge 8
Asserts whether a given formState has its redirect set to a given route.
Parameters
\Drupal\Core\Form\FormState $formState: The current form state.
string $routeName: The name of the route.
string $vocabularyId: The target vocabulary machine name.
3 calls to MergeTermsTestBase::assertRedirect()
- MergeTermsConfirmTest::submitRedirectsToMergeRoute in tests/
src/ Kernel/ Form/ MergeTermsConfirmTest.php - Tests the redirect after merging terms.
- MergeTermsTargetTest::existingTermSubmission in tests/
src/ Kernel/ Form/ MergeTermsTargetTest.php - Tests term merging to an existing term.
- MergeTermsTargetTest::newTermFormSubmission in tests/
src/ Kernel/ Form/ MergeTermsTargetTest.php - Tests term merging to a new term.
File
- tests/
src/ Kernel/ MergeTermsTestBase.php, line 142
Class
- MergeTermsTestBase
- Base class for Term merge kernel tests.
Namespace
Drupal\Tests\term_merge\KernelCode
protected function assertRedirect(FormState $formState, $routeName, $vocabularyId) {
$routeParameters['taxonomy_vocabulary'] = $vocabularyId;
$expected = new Url($routeName, $routeParameters);
KernelTestBase::assertEquals($expected, $formState
->getRedirect());
}