Commit 0631d191 authored by catch's avatar catch
Browse files

Issue #1855228 by damiankloip: Move Views core module tests to their respective modules.

parent 881b8a6a
......@@ -2,10 +2,10 @@
/**
* @file
* Definition of Drupal\views\Tests\Comment\ArgumentUserUIDTest.
* Contains \Drupal\comment\Tests\Views\ArgumentUserUIDTest.
*/
namespace Drupal\views\Tests\Comment;
namespace Drupal\comment\Tests\Views;
/**
* Tests the argument_comment_user_uid handler.
......
......@@ -2,12 +2,13 @@
/**
* @file
* Definition of Drupal\views\Tests\Comment\CommentTestBase.
* Contains \Drupal\comment\Tests\Views\CommentTestBase.
*/
namespace Drupal\views\Tests\Comment;
namespace Drupal\comment\Tests\Views;
use Drupal\views\Tests\ViewTestBase;
use Drupal\views\Tests\ViewTestData;
/**
* Tests the argument_comment_user_uid handler.
......@@ -19,11 +20,13 @@ abstract class CommentTestBase extends ViewTestBase {
*
* @var array
*/
public static $modules = array('comment');
public static $modules = array('comment', 'comment_test_views');
function setUp() {
parent::setUp();
ViewTestData::importTestViews(get_class($this), array('comment_test_views'));
// Add two users, create a node with the user1 as author and another node
// with user2 as author. For the second node add a comment from user1.
$this->account = $this->drupalCreateUser();
......
......@@ -2,10 +2,10 @@
/**
* @file
* Definition of Drupal\views\Tests\Comment\DefaultViewRecentComments.
* Contains \Drupal\comment\Tests\Views\DefaultViewRecentComments.
*/
namespace Drupal\views\Tests\Comment;
namespace Drupal\comment\Tests\Views;
use Drupal\entity\DatabaseStorageController;
use Drupal\views\Tests\ViewTestBase;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Definition of Drupal\views\Tests\Comment\FilterUserUIDTest.
* Contains \Drupal\comment\Tests\Views\FilterUserUIDTest.
*/
namespace Drupal\views\Tests\Comment;
namespace Drupal\comment\Tests\Views;
/**
* Tests the filter_comment_user_uid handler.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Definition of Drupal\views\Tests\Comment\WizardTest.
* Contains \Drupal\comment\Tests\Views\WizardTest.
*/
namespace Drupal\views\Tests\Comment;
namespace Drupal\comment\Tests\Views;
use Drupal\views\Tests\Wizard\WizardTestBase;
......
name = Comment test views
description = Provides default views for views comment tests.
package = Testing
version = VERSION
core = 8.x
dependencies[] = comment
dependencies[] = views
hidden = TRUE
......@@ -2,10 +2,10 @@
/**
* @file
* Definition of Drupal\views\Test\Field\ApiDataTest.
* Contains \Drupal\field\Tests\Views\ApiDataTest.
*/
namespace Drupal\views\Tests\Field;
namespace Drupal\field\Tests\Views;
/**
* Test the produced views_data.
......
......@@ -2,7 +2,7 @@
/**
* @file
* Definition of Drupal\views\Test\Field\FieldTestBase.
* Contains \Drupal\field\Tests\Views\FieldTestBase.
*/
/**
......@@ -16,15 +16,23 @@
* - Use relationships between different entity types, for example node and the node author(user).
*/
namespace Drupal\views\Tests\Field;
namespace Drupal\field\Tests\Views;
use Drupal\views\Tests\ViewTestBase;
use Drupal\views\Tests\ViewTestData;
/**
* Provides some helper methods for testing fieldapi integration into views.
*/
abstract class FieldTestBase extends ViewTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('field_test_views');
/**
* Stores the field definitions used by the test.
* @var array
......@@ -37,6 +45,12 @@ abstract class FieldTestBase extends ViewTestBase {
*/
public $instances;
protected function setUp() {
parent::setUp();
ViewTestData::importTestViews(get_class($this), array('field_test_views'));
}
function setUpFields($amount = 3) {
// Create three fields.
$field_names = array();
......
......@@ -2,10 +2,10 @@
/**
* @file
* Definition of Drupal\views\Test\Field\HandlerFieldFieldTest.
* Contains \Drupal\field\Tests\Views\HandlerFieldFieldTest.
*/
namespace Drupal\views\Tests\Field;
namespace Drupal\field\Tests\Views;
use Drupal\views\ViewExecutable;
......
name = User test views
description = Provides default views for views user tests.
package = Testing
version = VERSION
core = 8.x
dependencies[] = views
hidden = TRUE
......@@ -2,10 +2,10 @@
/**
* @file
* Contains Drupal\views\Tests\Language\ArgumentLanguageTest.
* Contains \Drupal\language\Tests\Views\ArgumentLanguageTest.
*/
namespace Drupal\views\Tests\Language;
namespace Drupal\language\Tests\Views;
use Drupal\Core\Language\Language;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains Drupal\views\Tests\Language\FieldLanguageTest.
* Contains \Drupal\language\Tests\Views\FieldLanguageTest.
*/
namespace Drupal\views\Tests\Language;
namespace Drupal\language\Tests\Views;
use Drupal\Core\Language\Language;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains Drupal\views\Tests\Language\FilterLanguageTest.
* Contains \Drupal\language\Tests\Views\FilterLanguageTest.
*/
namespace Drupal\views\Tests\Language;
namespace Drupal\language\Tests\Views;
use Drupal\Core\Language\Language;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains Drupal\views\Tests\Language\LanguageTestBase.
* Contains \Drupal\language\Tests\Views\LanguageTestBase.
*/
namespace Drupal\views\Tests\Language;
namespace Drupal\language\Tests\Views;
use Drupal\views\Tests\ViewUnitTestBase;
use Drupal\Core\Language\Language;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Definition of Drupal\views\Tests\Node\FieldTypeTest.
* Contains \Drupal\node\Tests\Views\FieldTypeTest.
*/
namespace Drupal\views\Tests\Node;
namespace Drupal\node\Tests\Views;
/**
* Tests the Drupal\node\Plugin\views\field\Type handler.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Definition of Drupal\views\Tests\Comment\FilterUidRevisionTest.
* Contains \Drupal\node\Tests\Views\FilterUidRevisionTest.
*/
namespace Drupal\views\Tests\Node;
namespace Drupal\node\Tests\Views;
/**
* Tests the node_uid_revision handler.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment