Issue #3420742 by quietone, sakthi_dev, BramDriesen: Fix words in test string by changing the string
(cherry picked from commit 729390194f
)
merge-requests/9720/head
parent
dde87be077
commit
fb6d290a81
|
@ -51,11 +51,9 @@ backlinks
|
|||
bakeware
|
||||
barbar
|
||||
barchart
|
||||
barqux
|
||||
basefield
|
||||
basepath
|
||||
basetheme
|
||||
bazbaz
|
||||
beatle
|
||||
bebebe
|
||||
beforeclose
|
||||
|
@ -99,7 +97,6 @@ buytaert
|
|||
bytea
|
||||
cachetag
|
||||
cachetags
|
||||
cafr
|
||||
callables
|
||||
callout
|
||||
camelid
|
||||
|
@ -150,7 +147,6 @@ contentblock
|
|||
contextuals
|
||||
controlgroup
|
||||
conv
|
||||
corge
|
||||
createrole
|
||||
createuser
|
||||
crema
|
||||
|
@ -276,8 +272,6 @@ fodg
|
|||
fodp
|
||||
fods
|
||||
fodt
|
||||
foobarbaz
|
||||
foofoo
|
||||
formattable
|
||||
fouc
|
||||
fourcol
|
||||
|
@ -322,13 +316,11 @@ imagetextalternative
|
|||
indexname
|
||||
inited
|
||||
inno
|
||||
instaclick
|
||||
instantiator
|
||||
interactable
|
||||
interruptible
|
||||
introspectable
|
||||
invalidators
|
||||
invalididentifier
|
||||
invokable
|
||||
isam
|
||||
isinstallable
|
||||
|
@ -373,7 +365,6 @@ longblob
|
|||
longerthan
|
||||
longtext
|
||||
loquesea
|
||||
lowline
|
||||
lrdd
|
||||
lstitle
|
||||
ltitle
|
||||
|
@ -560,12 +551,9 @@ questionmark
|
|||
quicklinks
|
||||
quickstart
|
||||
quinlan
|
||||
quux
|
||||
quxqux
|
||||
qvalue
|
||||
qvalues
|
||||
qwer
|
||||
qwerqwer
|
||||
ralouphie
|
||||
rasterizable
|
||||
rasterizes
|
||||
|
@ -589,7 +577,6 @@ replyto
|
|||
resave
|
||||
resaved
|
||||
resaving
|
||||
restplugin
|
||||
restrictor
|
||||
restripe
|
||||
restriped
|
||||
|
@ -650,7 +637,6 @@ srcset
|
|||
ssess
|
||||
starterkit
|
||||
statuscode
|
||||
stdclass
|
||||
stddev
|
||||
stickied
|
||||
stitle
|
||||
|
@ -734,14 +720,11 @@ testsuites
|
|||
textareas
|
||||
textboxes
|
||||
textfields
|
||||
textformat
|
||||
textwithsummary
|
||||
themename
|
||||
themer
|
||||
themers
|
||||
themey
|
||||
theseer
|
||||
theseparator
|
||||
threecol
|
||||
tids
|
||||
timegate
|
||||
|
@ -807,7 +790,6 @@ uploaders
|
|||
uploadprogress
|
||||
upscaling
|
||||
urandom
|
||||
userid
|
||||
userinfo
|
||||
userref
|
||||
vampirize
|
||||
|
|
|
@ -126,7 +126,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
'label' => 'hidden',
|
||||
'settings' => [
|
||||
'format_type' => 'long',
|
||||
'separator' => 'THESEPARATOR',
|
||||
'separator' => 'THE_SEPARATOR',
|
||||
] + $this->defaultSettings,
|
||||
];
|
||||
|
||||
|
@ -147,7 +147,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($start_expected_markup, $output, "Formatted date field using long format displayed as $start_expected with $start_expected_iso attribute in $timezone.");
|
||||
$this->assertStringContainsString($end_expected_markup, $output, "Formatted date field using long format displayed as $end_expected with $end_expected_iso attribute in $timezone.");
|
||||
$this->assertStringContainsString(' THESEPARATOR ', $output, 'Found proper separator');
|
||||
$this->assertStringContainsString(' THE_SEPARATOR ', $output, 'Found proper separator');
|
||||
|
||||
// Verify that hook_entity_prepare_view can add attributes.
|
||||
// @see entity_test_entity_prepare_view()
|
||||
|
@ -210,7 +210,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
'label' => 'hidden',
|
||||
'settings' => [
|
||||
'format_type' => 'long',
|
||||
'separator' => 'THESEPARATOR',
|
||||
'separator' => 'THE_SEPARATOR',
|
||||
] + $this->defaultSettings,
|
||||
];
|
||||
|
||||
|
@ -223,7 +223,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
$start_expected_markup = '<time datetime="' . $start_expected_iso . '">' . $start_expected . '</time>';
|
||||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($start_expected_markup, $output, "Formatted date field using long format displayed as $start_expected with $start_expected_iso attribute in $timezone.");
|
||||
$this->assertStringNotContainsString(' THESEPARATOR ', $output, 'Separator not found on page in ' . $timezone);
|
||||
$this->assertStringNotContainsString(' THE_SEPARATOR ', $output, 'Separator not found on page in ' . $timezone);
|
||||
|
||||
// Verify that hook_entity_prepare_view can add attributes.
|
||||
// @see entity_test_entity_prepare_view()
|
||||
|
@ -239,7 +239,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
$expected = $start_date->format(DateTimeItemInterface::DATE_STORAGE_FORMAT);
|
||||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($expected, $output, "Formatted date field using plain format displayed as $expected in $timezone.");
|
||||
$this->assertStringNotContainsString(' THESEPARATOR ', $output, 'Separator not found on page');
|
||||
$this->assertStringNotContainsString(' THE_SEPARATOR ', $output, 'Separator not found on page');
|
||||
|
||||
$this->displayOptions['type'] = 'daterange_custom';
|
||||
$this->displayOptions['settings'] = ['date_format' => 'm/d/Y'] + $this->defaultSettings;
|
||||
|
@ -249,7 +249,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
$expected = $start_date->format($this->displayOptions['settings']['date_format']);
|
||||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($expected, $output, "Formatted date field using daterange_custom format displayed as $expected in $timezone.");
|
||||
$this->assertStringNotContainsString(' THESEPARATOR ', $output, 'Separator not found on page');
|
||||
$this->assertStringNotContainsString(' THE_SEPARATOR ', $output, 'Separator not found on page');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -309,7 +309,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
// Verify that the default formatter works.
|
||||
$this->displayOptions['settings'] = [
|
||||
'format_type' => 'long',
|
||||
'separator' => 'THESEPARATOR',
|
||||
'separator' => 'THE_SEPARATOR',
|
||||
] + $this->defaultSettings;
|
||||
$display_repository->getViewDisplay($this->field->getTargetEntityTypeId(), $this->field->getTargetBundle(), 'full')
|
||||
->setComponent($field_name, $this->displayOptions)
|
||||
|
@ -324,7 +324,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($start_expected_markup, $output, "Formatted date field using long format displayed as $start_expected with $start_expected_iso attribute.");
|
||||
$this->assertStringContainsString($end_expected_markup, $output, "Formatted date field using long format displayed as $end_expected with $end_expected_iso attribute.");
|
||||
$this->assertStringContainsString(' THESEPARATOR ', $output, 'Found proper separator');
|
||||
$this->assertStringContainsString(' THE_SEPARATOR ', $output, 'Found proper separator');
|
||||
|
||||
// Verify that hook_entity_prepare_view can add attributes.
|
||||
// @see entity_test_entity_prepare_view()
|
||||
|
@ -389,7 +389,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
'label' => 'hidden',
|
||||
'settings' => [
|
||||
'format_type' => 'long',
|
||||
'separator' => 'THESEPARATOR',
|
||||
'separator' => 'THE_SEPARATOR',
|
||||
] + $this->defaultSettings,
|
||||
];
|
||||
|
||||
|
@ -402,7 +402,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
$start_expected_markup = '<time datetime="' . $start_expected_iso . '">' . $start_expected . '</time>';
|
||||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($start_expected_markup, $output, "Formatted date field using long format displayed as $start_expected with $start_expected_iso attribute.");
|
||||
$this->assertStringNotContainsString(' THESEPARATOR ', $output, 'Separator not found on page');
|
||||
$this->assertStringNotContainsString(' THE_SEPARATOR ', $output, 'Separator not found on page');
|
||||
|
||||
// Verify that hook_entity_prepare_view can add attributes.
|
||||
// @see entity_test_entity_prepare_view()
|
||||
|
@ -418,7 +418,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
$expected = $start_date->format(DateTimeItemInterface::DATETIME_STORAGE_FORMAT);
|
||||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($expected, $output, "Formatted date field using plain format displayed as $expected.");
|
||||
$this->assertStringNotContainsString(' THESEPARATOR ', $output, 'Separator not found on page');
|
||||
$this->assertStringNotContainsString(' THE_SEPARATOR ', $output, 'Separator not found on page');
|
||||
|
||||
$this->displayOptions['type'] = 'daterange_custom';
|
||||
$this->displayOptions['settings'] = ['date_format' => 'm/d/Y g:i:s A'] + $this->defaultSettings;
|
||||
|
@ -428,7 +428,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
$expected = $start_date->format($this->displayOptions['settings']['date_format']);
|
||||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($expected, $output, "Formatted date field using daterange_custom format displayed as $expected.");
|
||||
$this->assertStringNotContainsString(' THESEPARATOR ', $output, 'Separator not found on page');
|
||||
$this->assertStringNotContainsString(' THE_SEPARATOR ', $output, 'Separator not found on page');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -482,7 +482,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
// Verify that the default formatter works.
|
||||
$this->displayOptions['settings'] = [
|
||||
'format_type' => 'long',
|
||||
'separator' => 'THESEPARATOR',
|
||||
'separator' => 'THE_SEPARATOR',
|
||||
] + $this->defaultSettings;
|
||||
$display_repository->getViewDisplay($this->field->getTargetEntityTypeId(), $this->field->getTargetBundle(), 'full')
|
||||
->setComponent($field_name, $this->displayOptions)
|
||||
|
@ -497,7 +497,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($start_expected_markup, $output, "Formatted date field using long format displayed as $start_expected with $start_expected_iso attribute.");
|
||||
$this->assertStringContainsString($end_expected_markup, $output, "Formatted date field using long format displayed as $end_expected with $end_expected_iso attribute.");
|
||||
$this->assertStringContainsString(' THESEPARATOR ', $output, 'Found proper separator');
|
||||
$this->assertStringContainsString(' THE_SEPARATOR ', $output, 'Found proper separator');
|
||||
|
||||
// Verify that hook_entity_prepare_view can add attributes.
|
||||
// @see entity_test_entity_prepare_view()
|
||||
|
@ -561,7 +561,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
'label' => 'hidden',
|
||||
'settings' => [
|
||||
'format_type' => 'long',
|
||||
'separator' => 'THESEPARATOR',
|
||||
'separator' => 'THE_SEPARATOR',
|
||||
] + $this->defaultSettings,
|
||||
];
|
||||
|
||||
|
@ -578,7 +578,7 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($start_expected_markup, $output, "Formatted date field using long format displayed as $start_expected with $start_expected_iso attribute.");
|
||||
$this->assertStringContainsString($end_expected_markup, $output, "Formatted date field using long format displayed as $end_expected with $end_expected_iso attribute.");
|
||||
$this->assertStringContainsString(' THESEPARATOR ', $output, 'Found proper separator');
|
||||
$this->assertStringContainsString(' THE_SEPARATOR ', $output, 'Found proper separator');
|
||||
|
||||
// Verify that hook_entity_prepare_view can add attributes.
|
||||
// @see entity_test_entity_prepare_view()
|
||||
|
@ -590,20 +590,20 @@ class DateRangeFieldTest extends DateTestBase {
|
|||
->getViewDisplay($this->field->getTargetEntityTypeId(), $this->field->getTargetBundle(), 'full')
|
||||
->setComponent($field_name, $this->displayOptions)
|
||||
->save();
|
||||
$expected = $start_date->format(DateTimeItemInterface::DATETIME_STORAGE_FORMAT) . ' THESEPARATOR ' . $end_date->format(DateTimeItemInterface::DATETIME_STORAGE_FORMAT);
|
||||
$expected = $start_date->format(DateTimeItemInterface::DATETIME_STORAGE_FORMAT) . ' THE_SEPARATOR ' . $end_date->format(DateTimeItemInterface::DATETIME_STORAGE_FORMAT);
|
||||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($expected, $output, "Formatted date field using plain format displayed as $expected.");
|
||||
$this->assertStringContainsString(' THESEPARATOR ', $output, 'Found proper separator');
|
||||
$this->assertStringContainsString(' THE_SEPARATOR ', $output, 'Found proper separator');
|
||||
|
||||
$this->displayOptions['type'] = 'daterange_custom';
|
||||
$this->displayOptions['settings']['date_format'] = 'm/d/Y';
|
||||
$display_repository->getViewDisplay($this->field->getTargetEntityTypeId(), $this->field->getTargetBundle(), 'full')
|
||||
->setComponent($field_name, $this->displayOptions)
|
||||
->save();
|
||||
$expected = $start_date->format($this->displayOptions['settings']['date_format']) . ' THESEPARATOR ' . $end_date->format($this->displayOptions['settings']['date_format']);
|
||||
$expected = $start_date->format($this->displayOptions['settings']['date_format']) . ' THE_SEPARATOR ' . $end_date->format($this->displayOptions['settings']['date_format']);
|
||||
$output = $this->renderTestEntity($id);
|
||||
$this->assertStringContainsString($expected, $output, "Formatted date field using daterange_custom format displayed as $expected.");
|
||||
$this->assertStringContainsString(' THESEPARATOR ', $output, 'Found proper separator');
|
||||
$this->assertStringContainsString(' THE_SEPARATOR ', $output, 'Found proper separator');
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -493,7 +493,7 @@ xss:ex/*XSS*//*/*/pression(alert("XSS"))\'>',
|
|||
|
||||
// Cookie manipulation.
|
||||
// @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#Cookie_manipulation
|
||||
$data[] = ['<META HTTP-EQUIV="Set-Cookie" Content="USERID=<SCRIPT>alert(\'XSS\')</SCRIPT>">', '<META http-equiv="Set-Cookie">alert(\'XSS\')">'];
|
||||
$data[] = ['<META HTTP-EQUIV="Set-Cookie" Content="UserID=<SCRIPT>alert(\'XSS\')</SCRIPT>">', '<META http-equiv="Set-Cookie">alert(\'XSS\')">'];
|
||||
|
||||
// UTF-7 encoding.
|
||||
// @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#UTF-7_encoding
|
||||
|
|
|
@ -87,8 +87,8 @@ class TextFormatElementFormTest extends KernelTestBase implements FormInterface
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function buildForm(array $form, FormStateInterface $form_state) {
|
||||
// A textformat field.
|
||||
$form['textformat'] = [
|
||||
// A text_format field.
|
||||
$form['text_format'] = [
|
||||
'#type' => 'text_format',
|
||||
'#required' => TRUE,
|
||||
'#title' => 'Text',
|
||||
|
@ -124,7 +124,7 @@ class TextFormatElementFormTest extends KernelTestBase implements FormInterface
|
|||
$form = $form_builder->getForm($this);
|
||||
$output = $this->render($form);
|
||||
$this->setRawContent($output);
|
||||
$this->assertFieldByName('textformat[value]');
|
||||
$this->assertFieldByName('text_format[value]');
|
||||
$this->assertRaw('<h4>Full HTML</h4>');
|
||||
$this->assertRaw('<h4>Filtered HTML</h4>');
|
||||
$this->assertRaw('<h4>Test format</h4>');
|
||||
|
|
|
@ -207,13 +207,13 @@ class JsonApiFunctionalMultilingualTest extends JsonApiFunctionalTestBase {
|
|||
// has a different title.
|
||||
$document = Json::decode($this->drupalGet('/jsonapi/node/article/' . $uuid));
|
||||
$document_ca = Json::decode($this->drupalGet('/ca/jsonapi/node/article/' . $uuid));
|
||||
$document_cafr = Json::decode($this->drupalGet('/ca-fr/jsonapi/node/article/' . $uuid));
|
||||
$document_ca_fr = Json::decode($this->drupalGet('/ca-fr/jsonapi/node/article/' . $uuid));
|
||||
$this->assertSame('en', $document['data']['attributes']['langcode']);
|
||||
$this->assertSame('ca', $document_ca['data']['attributes']['langcode']);
|
||||
$this->assertSame('ca', $document_cafr['data']['attributes']['langcode']);
|
||||
$this->assertSame('ca', $document_ca_fr['data']['attributes']['langcode']);
|
||||
$this->assertSame($node->getTitle(), $document['data']['attributes']['title']);
|
||||
$this->assertSame($node->getTitle() . ' (ca)', $document_ca['data']['attributes']['title']);
|
||||
$this->assertSame($node->getTitle() . ' (ca)', $document_cafr['data']['attributes']['title']);
|
||||
$this->assertSame($node->getTitle() . ' (ca)', $document_ca_fr['data']['attributes']['title']);
|
||||
|
||||
// PATCH the 'ca-fr' translation.
|
||||
$this->grantPermissions(Role::load(RoleInterface::ANONYMOUS_ID), [
|
||||
|
@ -226,7 +226,7 @@ class JsonApiFunctionalMultilingualTest extends JsonApiFunctionalTestBase {
|
|||
'type' => 'node--article',
|
||||
'id' => $uuid,
|
||||
'attributes' => [
|
||||
'title' => $document_cafr['data']['attributes']['title'] . ' UPDATED',
|
||||
'title' => $document_ca_fr['data']['attributes']['title'] . ' UPDATED',
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
|
|
@ -441,7 +441,7 @@ class JsonApiPatchRegressionTest extends JsonApiFunctionalTestBase {
|
|||
// cSpell:disable-next-line
|
||||
'sumary' => 'Boring old "Hello World".',
|
||||
// And finally, one that is completely absurd.
|
||||
'foobarbaz' => '<script>alert("HI!");</script>',
|
||||
'foobar' => '<script>alert("HI!");</script>',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
@ -454,7 +454,7 @@ class JsonApiPatchRegressionTest extends JsonApiFunctionalTestBase {
|
|||
$this->assertSame(422, $response->getStatusCode());
|
||||
$this->assertNotNull($data);
|
||||
// cSpell:disable-next-line
|
||||
$this->assertSame("The properties 'form', 'sumary', 'foobarbaz' do not exist on the 'body' field of type 'text_with_summary'. Writable properties are: 'value', 'format', 'summary'.", $data['errors'][0]['detail']);
|
||||
$this->assertSame("The properties 'form', 'sumary', 'foobar' do not exist on the 'body' field of type 'text_with_summary'. Writable properties are: 'value', 'format', 'summary'.", $data['errors'][0]['detail']);
|
||||
|
||||
$request_options = [
|
||||
RequestOptions::HEADERS => [
|
||||
|
|
|
@ -40,9 +40,9 @@ class JsonApiSpecTest extends UnitTestCase {
|
|||
$data['hyphen-start'] = ['-kittens', FALSE];
|
||||
$data['hyphen-middle'] = ['kitt-ens', TRUE];
|
||||
$data['hyphen-end'] = ['kittens-', FALSE];
|
||||
$data['lowline-start'] = ['_kittens', FALSE];
|
||||
$data['lowline-middle'] = ['kitt_ens', TRUE];
|
||||
$data['lowline-end'] = ['kittens_', FALSE];
|
||||
$data['low-line-start'] = ['_kittens', FALSE];
|
||||
$data['low-line-middle'] = ['kitt_ens', TRUE];
|
||||
$data['low-line-end'] = ['kittens_', FALSE];
|
||||
$data['space-start'] = [' kittens', FALSE];
|
||||
$data['space-middle'] = ['kitt ens', TRUE];
|
||||
$data['space-end'] = ['kittens ', FALSE];
|
||||
|
|
|
@ -54,7 +54,7 @@ class RequestHandlerTest extends KernelTestBase {
|
|||
*/
|
||||
public function testHandle() {
|
||||
$request = new Request([], [], [], [], [], ['CONTENT_TYPE' => 'application/json'], Json::encode(['this is an array']));
|
||||
$route_match = new RouteMatch('test', (new Route('/rest/test', ['_rest_resource_config' => 'restplugin', 'example' => ''], ['_format' => 'json']))->setMethods(['GET']));
|
||||
$route_match = new RouteMatch('test', (new Route('/rest/test', ['_rest_resource_config' => 'rest_plugin', 'example' => ''], ['_format' => 'json']))->setMethods(['GET']));
|
||||
|
||||
$resource = $this->prophesize(StubRequestHandlerResourcePlugin::class);
|
||||
$resource->get('', $request)
|
||||
|
@ -83,7 +83,7 @@ class RequestHandlerTest extends KernelTestBase {
|
|||
$this->assertEquals($response, $handler_response);
|
||||
|
||||
// We will call the patch method this time.
|
||||
$route_match = new RouteMatch('test', (new Route('/rest/test', ['_rest_resource_config' => 'restplugin', 'example_original' => ''], ['_content_type_format' => 'json']))->setMethods(['PATCH']));
|
||||
$route_match = new RouteMatch('test', (new Route('/rest/test', ['_rest_resource_config' => 'rest_plugin', 'example_original' => ''], ['_content_type_format' => 'json']))->setMethods(['PATCH']));
|
||||
$request->setMethod('PATCH');
|
||||
$response = new ResourceResponse([]);
|
||||
$resource->patch(['this is an array'], $request)
|
||||
|
|
|
@ -37,7 +37,7 @@ class ResourceResponseSubscriberTest extends UnitTestCase {
|
|||
*/
|
||||
public function testSerialization($data, $expected_response = FALSE) {
|
||||
$request = new Request();
|
||||
$route_match = new RouteMatch('test', new Route('/rest/test', ['_rest_resource_config' => 'restplugin'], ['_format' => 'json']));
|
||||
$route_match = new RouteMatch('test', new Route('/rest/test', ['_rest_resource_config' => 'rest_plugin'], ['_format' => 'json']));
|
||||
|
||||
$handler_response = new ResourceResponse($data);
|
||||
$resource_response_subscriber = $this->getFunctioningResourceResponseSubscriber($route_match);
|
||||
|
|
|
@ -138,10 +138,10 @@ class SystemMenuBlockTest extends KernelTestBase {
|
|||
2 => MenuLinkMock::create(['id' => 'test.example2', 'route_name' => 'example2', 'title' => 'bar', 'parent' => '', 'route_parameters' => ['foo' => 'bar'], 'weight' => 1]),
|
||||
3 => MenuLinkMock::create(['id' => 'test.example3', 'route_name' => 'example3', 'title' => 'baz', 'parent' => 'test.example2', 'weight' => 2]),
|
||||
4 => MenuLinkMock::create(['id' => 'test.example4', 'route_name' => 'example4', 'title' => 'qux', 'parent' => 'test.example3', 'weight' => 3]),
|
||||
5 => MenuLinkMock::create(['id' => 'test.example5', 'route_name' => 'example5', 'title' => 'foofoo', 'parent' => '', 'expanded' => TRUE, 'weight' => 4]),
|
||||
5 => MenuLinkMock::create(['id' => 'test.example5', 'route_name' => 'example5', 'title' => 'title5', 'parent' => '', 'expanded' => TRUE, 'weight' => 4]),
|
||||
6 => MenuLinkMock::create(['id' => 'test.example6', 'route_name' => '', 'url' => 'https://www.drupal.org/', 'title' => 'barbar', 'parent' => '', 'weight' => 5]),
|
||||
7 => MenuLinkMock::create(['id' => 'test.example7', 'route_name' => 'example7', 'title' => 'bazbaz', 'parent' => 'test.example5', 'weight' => 6]),
|
||||
8 => MenuLinkMock::create(['id' => 'test.example8', 'route_name' => 'example8', 'title' => 'quxqux', 'parent' => '', 'weight' => 7]),
|
||||
7 => MenuLinkMock::create(['id' => 'test.example7', 'route_name' => 'example7', 'title' => 'title7', 'parent' => 'test.example5', 'weight' => 6]),
|
||||
8 => MenuLinkMock::create(['id' => 'test.example8', 'route_name' => 'example8', 'title' => 'title8', 'parent' => '', 'weight' => 7]),
|
||||
];
|
||||
foreach ($links as $instance) {
|
||||
$this->menuLinkManager->addDefinition($instance->getPluginId(), $instance->getPluginDefinition());
|
||||
|
|
|
@ -254,7 +254,7 @@ class TextSummaryTest extends KernelTestBase {
|
|||
$this->installEntitySchema('entity_test');
|
||||
$this->setUpCurrentUser();
|
||||
$field_definition = FieldStorageConfig::create([
|
||||
'field_name' => 'test_textwithsummary',
|
||||
'field_name' => 'test_text_with_summary',
|
||||
'type' => 'text_with_summary',
|
||||
'entity_type' => 'entity_test',
|
||||
'cardinality' => 1,
|
||||
|
@ -265,7 +265,7 @@ class TextSummaryTest extends KernelTestBase {
|
|||
$field_definition->save();
|
||||
|
||||
$instance = FieldConfig::create([
|
||||
'field_name' => 'test_textwithsummary',
|
||||
'field_name' => 'test_text_with_summary',
|
||||
'label' => 'A text field',
|
||||
'entity_type' => 'entity_test',
|
||||
'bundle' => 'entity_test',
|
||||
|
@ -282,7 +282,7 @@ class TextSummaryTest extends KernelTestBase {
|
|||
'bundle' => 'entity_test',
|
||||
'mode' => 'default',
|
||||
'status' => TRUE,
|
||||
])->setComponent('test_textwithsummary', [
|
||||
])->setComponent('test_text_with_summary', [
|
||||
'type' => 'text_textarea_with_summary',
|
||||
'settings' => [
|
||||
'summary_rows' => 2,
|
||||
|
@ -295,17 +295,17 @@ class TextSummaryTest extends KernelTestBase {
|
|||
$entity = EntityTest::create([
|
||||
'name' => $this->randomMachineName(),
|
||||
'type' => 'entity_test',
|
||||
'test_textwithsummary' => ['value' => $this->randomMachineName()],
|
||||
'test_text_with_summary' => ['value' => $this->randomMachineName()],
|
||||
]);
|
||||
$form = \Drupal::service('entity.form_builder')->getForm($entity);
|
||||
$this->assertNotEmpty($form['test_textwithsummary']['widget'][0]['summary'], 'Summary field is shown');
|
||||
$this->assertNotEmpty($form['test_textwithsummary']['widget'][0]['summary']['#required'], 'Summary field is required');
|
||||
$this->assertNotEmpty($form['test_text_with_summary']['widget'][0]['summary'], 'Summary field is shown');
|
||||
$this->assertNotEmpty($form['test_text_with_summary']['widget'][0]['summary']['#required'], 'Summary field is required');
|
||||
|
||||
// Test validation.
|
||||
/** @var \Symfony\Component\Validator\ConstraintViolation[] $violations */
|
||||
$violations = $entity->validate();
|
||||
$this->assertCount(1, $violations);
|
||||
$this->assertEquals('test_textwithsummary.0.summary', $violations[0]->getPropertyPath());
|
||||
$this->assertEquals('test_text_with_summary.0.summary', $violations[0]->getPropertyPath());
|
||||
$this->assertEquals('The summary field is required for A text field', $violations[0]->getMessage());
|
||||
}
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ class FilterInOperatorTest extends ViewsKernelTestBase {
|
|||
$input_options = [
|
||||
'foo' => 'bar',
|
||||
'baz' => $this->t('qux'),
|
||||
'quux' => (object) ['option' => ['quux' => 'corge']],
|
||||
'foobar' => (object) ['option' => ['foobar' => 'dog']],
|
||||
];
|
||||
$reduced_values = $operator->reduceValueOptions($input_options);
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ class UnsavedPreviewTest extends UITestBase {
|
|||
$this->drupalGet('admin/structure/views/nojs/display/content/page_2/path');
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
|
||||
$this->submitForm(['path' => 'foobarbaz'], 'Apply');
|
||||
$this->submitForm(['path' => 'foobar'], 'Apply');
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
|
||||
$this->submitForm([], 'Update preview');
|
||||
|
@ -78,7 +78,7 @@ class UnsavedPreviewTest extends UITestBase {
|
|||
|
||||
$this->submitForm([], 'Update preview');
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
$this->assertSession()->linkByHrefExists('foobarbaz');
|
||||
$this->assertSession()->linkByHrefExists('foobar');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Drupal\FunctionalTests\Routing;
|
|||
|
||||
use Drupal\Tests\BrowserTestBase;
|
||||
|
||||
// cspell:ignore ȅchȏ meΦω
|
||||
// cspell:ignore ȅchȏ foobarbaz meΦω
|
||||
|
||||
/**
|
||||
* Tests incoming path case insensitivity.
|
||||
|
|
|
@ -106,10 +106,10 @@ class MenuLinkTreeTest extends KernelTestBase {
|
|||
2 => MenuLinkMock::create(['id' => 'test.example2', 'route_name' => 'example2', 'title' => 'bar', 'parent' => 'test.example1', 'route_parameters' => ['foo' => 'bar']]),
|
||||
3 => MenuLinkMock::create(['id' => 'test.example3', 'route_name' => 'example3', 'title' => 'baz', 'parent' => 'test.example2', 'route_parameters' => ['baz' => 'qux']]),
|
||||
4 => MenuLinkMock::create(['id' => 'test.example4', 'route_name' => 'example4', 'title' => 'qux', 'parent' => 'test.example3']),
|
||||
5 => MenuLinkMock::create(['id' => 'test.example5', 'route_name' => 'example5', 'title' => 'foofoo', 'parent' => '']),
|
||||
5 => MenuLinkMock::create(['id' => 'test.example5', 'route_name' => 'example5', 'title' => 'title5', 'parent' => '']),
|
||||
6 => MenuLinkMock::create(['id' => 'test.example6', 'route_name' => '', 'url' => 'https://www.drupal.org/', 'title' => 'barbar', 'parent' => '']),
|
||||
7 => MenuLinkMock::create(['id' => 'test.example7', 'route_name' => 'example7', 'title' => 'bazbaz', 'parent' => '']),
|
||||
8 => MenuLinkMock::create(['id' => 'test.example8', 'route_name' => 'example8', 'title' => 'quxqux', 'parent' => '']),
|
||||
7 => MenuLinkMock::create(['id' => 'test.example7', 'route_name' => 'example7', 'title' => 'title7', 'parent' => '']),
|
||||
8 => MenuLinkMock::create(['id' => 'test.example8', 'route_name' => 'example8', 'title' => 'title8', 'parent' => '']),
|
||||
];
|
||||
foreach ($links as $instance) {
|
||||
$this->menuLinkManager->addDefinition($instance->getPluginId(), $instance->getPluginDefinition());
|
||||
|
|
|
@ -77,7 +77,7 @@ class HtmlTest extends TestCase {
|
|||
[$id3, $id3],
|
||||
// Verify that invalid characters (including non-breaking space) are
|
||||
// stripped from the identifier.
|
||||
['invalididentifier', 'invalid !"#$%&\'()*+,./:;<=>?@[\\]^`{|}~ identifier', []],
|
||||
['invalid_identifier', 'invalid_ !"#$%&\'()*+,./:;<=>?@[\\]^`{|}~ identifier', []],
|
||||
// Verify that an identifier starting with a digit is replaced.
|
||||
['_css_identifier', '1css_identifier', []],
|
||||
// Verify that an identifier starting with a hyphen followed by a digit is
|
||||
|
|
|
@ -316,12 +316,12 @@ SH;
|
|||
'--name="Test custom starterkit theme"',
|
||||
'--description="Custom theme generated from a starterkit theme"',
|
||||
'--starterkit',
|
||||
'foobarbaz',
|
||||
'foobar',
|
||||
];
|
||||
$process = new Process($install_command, NULL);
|
||||
$process->setTimeout(60);
|
||||
$result = $process->run();
|
||||
$this->assertStringContainsString('Theme source theme foobarbaz cannot be found.', trim($process->getErrorOutput()));
|
||||
$this->assertStringContainsString('Theme source theme foobar cannot be found.', trim($process->getErrorOutput()));
|
||||
$this->assertSame(1, $result);
|
||||
}
|
||||
|
||||
|
|
|
@ -119,8 +119,8 @@ class EntityLinkTest extends UnitTestCase {
|
|||
$data = [];
|
||||
$data[] = [
|
||||
'some_entity_label',
|
||||
'qwerqwer',
|
||||
'qwerqwer',
|
||||
'link text',
|
||||
'link text',
|
||||
];
|
||||
$data[] = [
|
||||
'some_entity_label',
|
||||
|
@ -134,20 +134,20 @@ class EntityLinkTest extends UnitTestCase {
|
|||
];
|
||||
$data[] = [
|
||||
'some_entity_label',
|
||||
'qwerqwer',
|
||||
'qwerqwer',
|
||||
'link text',
|
||||
'link text',
|
||||
'edit-form',
|
||||
];
|
||||
$data[] = [
|
||||
'some_entity_label',
|
||||
'qwerqwer',
|
||||
'qwerqwer',
|
||||
'link text',
|
||||
'link text',
|
||||
'edit-form',
|
||||
];
|
||||
$data[] = [
|
||||
'some_entity_label',
|
||||
'qwerqwer',
|
||||
'qwerqwer',
|
||||
'link text',
|
||||
'link text',
|
||||
'edit-form',
|
||||
['foo' => 'qwer'],
|
||||
];
|
||||
|
|
|
@ -124,10 +124,10 @@ class DefaultMenuLinkTreeManipulatorsTest extends UnitTestCase {
|
|||
2 => MenuLinkMock::create(['id' => 'test.example2', 'route_name' => 'example2', 'title' => 'bar', 'parent' => 'test.example1', 'route_parameters' => ['foo' => 'bar']]),
|
||||
3 => MenuLinkMock::create(['id' => 'test.example3', 'route_name' => 'example3', 'title' => 'baz', 'parent' => 'test.example2', 'route_parameters' => ['baz' => 'qux']]),
|
||||
4 => MenuLinkMock::create(['id' => 'test.example4', 'route_name' => 'example4', 'title' => 'qux', 'parent' => 'test.example3']),
|
||||
5 => MenuLinkMock::create(['id' => 'test.example5', 'route_name' => 'example5', 'title' => 'foofoo', 'parent' => '']),
|
||||
5 => MenuLinkMock::create(['id' => 'test.example5', 'route_name' => 'example5', 'title' => 'title5', 'parent' => '']),
|
||||
6 => MenuLinkMock::create(['id' => 'test.example6', 'route_name' => '', 'url' => 'https://www.drupal.org/', 'title' => 'barbar', 'parent' => '']),
|
||||
7 => MenuLinkMock::create(['id' => 'test.example7', 'route_name' => 'example7', 'title' => 'bazbaz', 'parent' => '']),
|
||||
8 => MenuLinkMock::create(['id' => 'test.example8', 'route_name' => 'example8', 'title' => 'quxqux', 'parent' => '']),
|
||||
7 => MenuLinkMock::create(['id' => 'test.example7', 'route_name' => 'example7', 'title' => 'title7', 'parent' => '']),
|
||||
8 => MenuLinkMock::create(['id' => 'test.example8', 'route_name' => 'example8', 'title' => 'title8', 'parent' => '']),
|
||||
9 => DynamicMenuLinkMock::create(['id' => 'test.example9', 'parent' => ''])->setCurrentUser($this->currentUser),
|
||||
];
|
||||
$this->originalTree = [];
|
||||
|
@ -158,14 +158,14 @@ class DefaultMenuLinkTreeManipulatorsTest extends UnitTestCase {
|
|||
// Validate that parent elements #1, #2, #5 and #6 exist on the root level.
|
||||
$this->assertEquals($this->links[1]->getPluginId(), $tree['50000 foo test.example1']->link->getPluginId());
|
||||
$this->assertEquals($this->links[2]->getPluginId(), $tree['50000 bar test.example2']->link->getPluginId());
|
||||
$this->assertEquals($this->links[5]->getPluginId(), $tree['50000 foofoo test.example5']->link->getPluginId());
|
||||
$this->assertEquals($this->links[5]->getPluginId(), $tree['50000 title5 test.example5']->link->getPluginId());
|
||||
$this->assertEquals($this->links[6]->getPluginId(), $tree['50000 barbar test.example6']->link->getPluginId());
|
||||
$this->assertEquals($this->links[8]->getPluginId(), $tree['50000 quxqux test.example8']->link->getPluginId());
|
||||
$this->assertEquals($this->links[8]->getPluginId(), $tree['50000 title8 test.example8']->link->getPluginId());
|
||||
|
||||
// Verify that child element #4 is at the correct location in the hierarchy.
|
||||
$this->assertEquals($this->links[4]->getPluginId(), $tree['50000 bar test.example2']->subtree['50000 baz test.example3']->subtree['50000 qux test.example4']->link->getPluginId());
|
||||
// Verify that child element #7 is at the correct location in the hierarchy.
|
||||
$this->assertEquals($this->links[7]->getPluginId(), $tree['50000 foofoo test.example5']->subtree['50000 bazbaz test.example7']->link->getPluginId());
|
||||
$this->assertEquals($this->links[7]->getPluginId(), $tree['50000 title5 test.example5']->subtree['50000 title7 test.example7']->link->getPluginId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -69,13 +69,13 @@ class MenuTreeParametersTest extends UnitTestCase {
|
|||
|
||||
// Add additional menu link plugin IDs; they should be merged, not replacing
|
||||
// the old ones.
|
||||
$parameters->addExpandedParents(['qux', 'quux']);
|
||||
$this->assertEquals(['foo', 'bar', 'baz', 'qux', 'quux'], $parameters->expandedParents);
|
||||
$parameters->addExpandedParents(['qux', 'foobar']);
|
||||
$this->assertEquals(['foo', 'bar', 'baz', 'qux', 'foobar'], $parameters->expandedParents);
|
||||
|
||||
// Add pre-existing menu link plugin IDs; they should not be added again;
|
||||
// this is a set.
|
||||
$parameters->addExpandedParents(['bar', 'quux']);
|
||||
$this->assertEquals(['foo', 'bar', 'baz', 'qux', 'quux'], $parameters->expandedParents);
|
||||
$parameters->addExpandedParents(['bar', 'foobar']);
|
||||
$this->assertEquals(['foo', 'bar', 'baz', 'qux', 'foobar'], $parameters->expandedParents);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -384,14 +384,14 @@ class DefaultPluginManagerTest extends UnitTestCase {
|
|||
$definitions = [];
|
||||
$definitions['array_based_found'] = ['provider' => 'module_found'];
|
||||
$definitions['array_based_missing'] = ['provider' => 'module_missing'];
|
||||
$definitions['stdclass_based_found'] = (object) ['provider' => 'module_found'];
|
||||
$definitions['stdclass_based_missing'] = (object) ['provider' => 'module_missing'];
|
||||
$definitions['stdClass_based_found'] = (object) ['provider' => 'module_found'];
|
||||
$definitions['stdClass_based_missing'] = (object) ['provider' => 'module_missing'];
|
||||
$definitions['classed_object_found'] = new ObjectDefinition(['provider' => 'module_found']);
|
||||
$definitions['classed_object_missing'] = new ObjectDefinition(['provider' => 'module_missing']);
|
||||
|
||||
$expected = [];
|
||||
$expected['array_based_found'] = $definitions['array_based_found'];
|
||||
$expected['stdclass_based_found'] = $definitions['stdclass_based_found'];
|
||||
$expected['stdClass_based_found'] = $definitions['stdClass_based_found'];
|
||||
$expected['classed_object_found'] = $definitions['classed_object_found'];
|
||||
|
||||
$module_handler = $this->prophesize(ModuleHandlerInterface::class);
|
||||
|
|
|
@ -477,7 +477,7 @@ class RendererBubblingTest extends RendererTestBase {
|
|||
$output = (string) $this->renderer->renderRoot($test_element);
|
||||
|
||||
// First, assert the render array is of the expected form.
|
||||
$this->assertEquals('Cache context!Cache tag!Asset!Placeholder!barquxNested!Cached nested!', trim($output), 'Expected HTML generated.');
|
||||
$this->assertEquals('Cache context!Cache tag!Asset!Placeholder!barstoolNested!Cached nested!', trim($output), 'Expected HTML generated.');
|
||||
$this->assertEquals(['child.cache_context'], $test_element['#cache']['contexts'], 'Expected cache contexts found.');
|
||||
$this->assertEquals(['child:cache_tag'], $test_element['#cache']['tags'], 'Expected cache tags found.');
|
||||
$expected_attached = [
|
||||
|
@ -572,7 +572,7 @@ class BubblingTest implements TrustedCallbackInterface {
|
|||
],
|
||||
'child_placeholder' => [
|
||||
'#create_placeholder' => TRUE,
|
||||
'#lazy_builder' => [__CLASS__ . '::bubblingPlaceholder', ['bar', 'qux']],
|
||||
'#lazy_builder' => [__CLASS__ . '::bubblingPlaceholder', ['bar', 'stool']],
|
||||
],
|
||||
'child_nested_pre_render_uncached' => [
|
||||
'#cache' => ['keys' => ['uncached_nested']],
|
||||
|
|
Loading…
Reference in New Issue