public function PathautoTest::testPathautoFieldEnhancer in Entity Share 8.3
Test Pathauto resource field enhancer plugin.
This test covers all configurations of this plugin.
File
- modules/
entity_share_client/ tests/ src/ Functional/ PathautoTest.php, line 114
Class
- PathautoTest
- General functional test class for path field.
Namespace
Drupal\Tests\entity_share_client\FunctionalCode
public function testPathautoFieldEnhancer() {
$this
->pathautoTestSetup(EntitySharePathautoEnhancer::EXPOSE_CURRENT_PATHAUTO);
$this
->assetEntityPath('es_test_path_auto', '/client/automatic', 'As the pathauto state is preserved, the client website has generated an alias based on its own pathauto pattern.');
$this
->assetEntityPath('es_test_path_manual', '/manual_path', 'As the pathauto state is preserved, the client website has not generated an alias and has used the one provided by the server website.');
$this
->pathautoTestSetup(EntitySharePathautoEnhancer::FORCE_ENABLE_PATHAUTO);
$this
->assetEntityPath('es_test_path_auto', '/client/automatic', 'As the pathauto state is forced to be on, the client website has generated an alias based on its own pathauto pattern.');
$this
->assetEntityPath('es_test_path_manual', '/client/manual', 'As the pathauto state is forced to be on, the client website has generated an alias based on its own pathauto pattern.');
$this
->pathautoTestSetup(EntitySharePathautoEnhancer::FORCE_DISABLE_PATHAUTO);
$this
->assetEntityPath('es_test_path_auto', '/server/automatic', 'As the pathauto state is forced to be off, the client website has not generated an alias and has used the one provided by the server (automatically created on the server website).');
$this
->assetEntityPath('es_test_path_manual', '/manual_path', 'As the pathauto state is forced to be off, the client website has not generated an alias and has used the one provided by the server (manually created on the server website).');
}