public function PathautoEntityWithStringIdTest::entityWithStringIdProvider in Pathauto 8
Provides test cases for ::testEntityWithStringId().
See also
\Drupal\Tests\pathauto\Kernel\PathautoEntityWithStringIdTest::testEntityWithStringId()
File
- tests/
src/ Kernel/ PathautoEntityWithStringIdTest.php, line 114
Class
- PathautoEntityWithStringIdTest
- Tests auto-aliasing of entities that use string IDs.
Namespace
Drupal\Tests\pathauto\KernelCode
public function entityWithStringIdProvider() {
return [
'ascii with less or equal 128 chars' => [
str_repeat('a', 128),
str_repeat('a', 128),
],
'ascii with over 128 chars' => [
str_repeat('a', 191),
Crypt::hashBase64(str_repeat('a', 191)),
],
'non-ascii with less or equal 128 chars' => [
str_repeat('社', 128),
Crypt::hashBase64(str_repeat('社', 128)),
],
'non-ascii with over 128 chars' => [
str_repeat('社', 191),
Crypt::hashBase64(str_repeat('社', 191)),
],
'simulating an integer id' => [
123,
'123',
],
];
}