The View class was split in two, but it's tests were not.

Also, after #1788266: Access the different views related properties on the right object, there are some tests in ViewStorageTest that should also be moved into ViewExecutableTest.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Assigned: Unassigned » dawehner

.

dawehner’s picture

Status: Active » Needs review
FileSize
11.73 KB

Here is the splitup.

Status: Needs review » Needs work

The last submitted patch, views-1792766-2.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
11.37 KB

Redid based on the recent changes.

tim.plunkett’s picture

Also, in ViewStorageTest, there are a couple places checking $view->executable directly. Those should probably be moved too.

Status: Needs review » Needs work

The last submitted patch, views-1792766-4.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
792 bytes
11.5 KB

Damn i had fixed this in the previous try.

dawehner’s picture

Assigned: dawehner » tim.plunkett

Assign to tim for a review.

dawehner’s picture

#7: views-1792766-7.patch queued for re-testing.

tim.plunkett’s picture

Assigned: tim.plunkett » dawehner
Status: Needs review » Reviewed & tested by the community
FileSize
5.18 KB
15.96 KB

I cleaned up some stuff.
I think its weird to call getExecutable() in the storage test, but that just makes it clear that newDisplay/addDisplay are weird methods.

RTBCing in the hope that it passes.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, views-1792766-10.patch, failed testing.

tim.plunkett’s picture

Hmm, missed something I guess. In the meantime.

+++ b/lib/Drupal/views/Tests/ViewExecutableTest.phpundefined
@@ -103,4 +122,81 @@ public function testDisplays() {
+    $this->assertFalse(isset($view->filter), 'Make sure all handlers are destroyed');
+    $this->assertFalse(isset($view->field), 'Make sure all handlers are destroyed');
+    $this->assertFalse(isset($view->argument), 'Make sure all handlers are destroyed');
+    $this->assertFalse(isset($view->relationship), 'Make sure all handlers are destroyed');
+    $this->assertFalse(isset($view->sort), 'Make sure all handlers are destroyed');
+    $this->assertFalse(isset($view->area), 'Make sure all handlers are destroyed');

Might as well say which type of handler in the message.

+++ b/lib/Drupal/views/Tests/ViewExecutableTest.phpundefined
@@ -103,4 +122,81 @@ public function testDisplays() {
+      // @todo The key on the display should be footers, headers and empties
+      // or something similar instead of the singular, but so long check for
+      // this special case.

The following two lines should be indented

+++ b/lib/Drupal/views/Tests/ViewExecutableTest.phpundefined
@@ -103,4 +122,81 @@ public function testDisplays() {
+    // @todo: Create an extra validation view.

No : needed

+++ b/lib/Drupal/views/Tests/ViewExecutableTest.phpundefined
@@ -103,4 +122,81 @@ public function testDisplays() {
+    // @todo: Write real tests for the validation.
+    // In general the following things could be tested:
+    // - Deleted displays shouldn't be validated
+    // - Multiple displays are validating and the errors are merged together.

No :, and indent the following lines

+++ b/lib/Drupal/views/Tests/ViewStorageTest.phpundefined
@@ -429,4 +431,43 @@ protected function displayMethodTests() {
+    // Check that the original view and the copy have different uuids.

UUIDs

+++ b/lib/Drupal/views/Tests/ViewStorageTest.phpundefined
@@ -429,4 +431,43 @@ protected function displayMethodTests() {
+    // Check the 'name' (id) is using the View objects default value ('') as it

ID

dawehner’s picture

Status: Needs work » Needs review
FileSize
8.21 KB
20.39 KB

Fixed the tests and did some additional cleanup.

tim.plunkett’s picture

Status: Needs review » Fixed

http://drupalcode.org/project/views.git/commit/3895a6f
Removed the two debug() calls and committed.

Automatically closed -- issue fixed for 2 weeks with no activity.