Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Issue forks
linkit-3049946
Commits
9e9045d5
Commit
9e9045d5
authored
Jul 09, 2016
by
Emil Stjerneman
Browse files
by anon: Fixed failing tests
parent
6ea2eaff
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/src/Kernel/LinkitEditorLinkDialogTest.php
View file @
9e9045d5
...
...
@@ -122,7 +122,7 @@ class LinkitEditorLinkDialogTest extends LinkitKernelTestBase {
$this
->
assertEquals
(
'linkit.autocomplete'
,
$form
[
'attributes'
][
'href'
][
'#autocomplete_route_name'
],
'Linkit is enabled on the href field.'
);
$this
->
assertEquals
(
''
,
$form
[
'attributes'
][
'href'
][
'#default_value'
],
'The href attribute is empty.'
);
$this
->
assertEquals
(
''
,
$form
[
'link-information'
][
'#context'
][
'link_target'
],
'Link information is empty.'
);
$this
->
assertEquals
(
''
,
$form
[
'
attributes'
][
'
link-information'
][
'#context'
][
'link_target'
],
'Link information is empty.'
);
$form_state
->
setValue
([
'attributes'
,
'href'
],
'entity:missing_entity/1'
);
$form_builder
->
submitForm
(
$form_object
,
$form_state
);
...
...
@@ -186,7 +186,7 @@ class LinkitEditorLinkDialogTest extends LinkitKernelTestBase {
$this
->
assertEquals
(
'linkit.autocomplete'
,
$form
[
'attributes'
][
'href'
][
'#autocomplete_route_name'
],
'Linkit is enabled on the href field.'
);
$this
->
assertEquals
(
'entity:entity_test/1'
,
$form
[
'attributes'
][
'href'
][
'#default_value'
],
'The href attribute is empty.'
);
$this
->
assertEquals
(
$entity
->
label
(),
$form
[
'link-information'
][
'#context'
][
'link_target'
],
'Link information is empty.'
);
$this
->
assertEquals
(
$entity
->
label
(),
$form
[
'
attributes'
][
'
link-information'
][
'#context'
][
'link_target'
],
'Link information is empty.'
);
// Make sure the dialog don't display entity labels for inaccessible
// entities.
...
...
@@ -222,7 +222,7 @@ class LinkitEditorLinkDialogTest extends LinkitKernelTestBase {
$this
->
assertEquals
(
'linkit.autocomplete'
,
$form
[
'attributes'
][
'href'
][
'#autocomplete_route_name'
],
'Linkit is enabled on the href field.'
);
$this
->
assertEquals
(
'entity:entity_test/2'
,
$form
[
'attributes'
][
'href'
][
'#default_value'
],
'The href attribute is empty.'
);
$this
->
assertEquals
(
'entity:entity_test/2'
,
$form
[
'link-information'
][
'#context'
][
'link_target'
],
'Link information is empty.'
);
$this
->
assertEquals
(
'entity:entity_test/2'
,
$form
[
'
attributes'
][
'
link-information'
][
'#context'
][
'link_target'
],
'Link information is empty.'
);
}
/**
...
...
@@ -261,7 +261,7 @@ class LinkitEditorLinkDialogTest extends LinkitKernelTestBase {
$this
->
assertEquals
(
'linkit.autocomplete'
,
$form
[
'attributes'
][
'href'
][
'#autocomplete_route_name'
],
'Linkit is enabled on the href field.'
);
$this
->
assertEquals
(
'http://example.com/'
,
$form
[
'attributes'
][
'href'
][
'#default_value'
],
'The href attribute is empty.'
);
$this
->
assertEquals
(
'http://example.com/'
,
$form
[
'link-information'
][
'#context'
][
'link_target'
],
'Link information is empty.'
);
$this
->
assertEquals
(
'http://example.com/'
,
$form
[
'
attributes'
][
'
link-information'
][
'#context'
][
'link_target'
],
'Link information is empty.'
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment