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