Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3485117
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3485117
Commits
5ee195f5
Commit
5ee195f5
authored
12 years ago
by
Damian Lee
Committed by
Tim Plunkett
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add a test to check creation and saving of a new display
parent
10db2c17
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Drupal/views/Tests/ViewStorageTest.php
+13
-0
13 additions, 0 deletions
lib/Drupal/views/Tests/ViewStorageTest.php
with
13 additions
and
0 deletions
lib/Drupal/views/Tests/ViewStorageTest.php
+
13
−
0
View file @
5ee195f5
...
...
@@ -172,6 +172,19 @@ function testConfigurableCRUD() {
$this
->
assertEqual
(
$created_loaded
->
display
[
'default'
]
->
display_plugin
,
'default'
,
'Make sure the right display plugin is set.'
);
$this
->
assertEqual
(
$values
,
$values_loaded
,
'The loaded config is the same as the original loaded one.'
);
// Check whether a display can be added and saved to a View.
$created
=
$controller
->
create
(
$values
);
$created
->
new_display
(
'page'
,
'Test'
,
'test'
);
$new_display
=
$created
->
display
[
'test'
];
$this
->
assertTrue
(
$new_display
instanceof
ViewDisplay
,
'New page display "test" created.'
);
$created
->
set
(
'name'
,
'archive_new_display'
);
$created
->
save
();
$values
=
config
(
'views.view.archive_new_display'
)
->
get
();
$this
->
assertTrue
(
isset
(
$values
[
'display'
][
'test'
])
&&
is_array
(
$values
[
'display'
][
'test'
]),
'New display was saved.'
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment