Commit 2f6501e4 authored by tim.plunkett's avatar tim.plunkett
Browse files

Issue #1605332 by tim.plunkett: Fix fatals in language tests and move plugins.

parent f3c1c193
<?php
/**
* @file
* Definition of Drupal\views\Tests\Language\ArgumentLanguage.php
* Definition of Drupal\views\Tests\Language\ArgumentLanguage.
*/
namespace Drupal\views\Tests\Language;
......@@ -14,6 +15,7 @@
* @see Views\language\Plugin\views\argument\Language.php
*/
class ArgumentLanguage extends LanguageTestBase {
public static function getInfo() {
return array(
'name' => 'Argument: Language',
......@@ -41,4 +43,5 @@ public function testFilter() {
$view->destroy();
}
}
}
<?php
/**
* @file
* Definition of Drupal\views\Tests\Language\FieldLanguage.php
* Definition of Drupal\views\Tests\Language\FieldLanguage.
*/
namespace Drupal\views\Tests\Language;
......@@ -14,11 +15,12 @@
* @see Views\language\Plugin\views\field\Language
*/
class FieldLanguage extends LanguageTestBase {
public static function getInfo() {
return array(
'name' => 'Field: Language',
'description' => 'Tests the field language handler.',
'group' => 'Views Handlers'
'group' => 'Views Handlers',
);
}
......@@ -36,4 +38,5 @@ public function testField() {
$this->assertEqual($view->field['langcode']->advanced_render($view->result[0]), 'English');
$this->assertEqual($view->field['langcode']->advanced_render($view->result[1]), 'Lolspeak');
}
}
<?php
/**
* @file
* Definition of Drupal\views\Tests\Language\FilterLanguage.php
* Definition of Drupal\views\Tests\Language\FilterLanguage.
*/
namespace Drupal\views\Tests\Language;
......@@ -14,6 +15,7 @@
* @see Views\language\Plugin\views\filter\Language
*/
class FilterLanguage extends LanguageTestBase {
public static function getInfo() {
return array(
'name' => 'Filter: Language',
......@@ -42,4 +44,5 @@ public function testFilter() {
$view->destroy();
}
}
}
<?php
/**
* @file
* Definition of Drupal\views\Tests\Language\LanguageTestBase.php
* Definition of Drupal\views\Tests\Language\LanguageTestBase.
*/
namespace Drupal\views\Tests\Language;
use Drupal\views\Tests\ViewsSqlTest;
use Drupal\views\Tests\ViewsSchemaTestBase;
use Drupal\Core\Language\Language;
/**
* Base class for all Language handler tests.
*/
abstract class LanguageTestBase extends ViewsSqlTest {
public static $modules = array('views', 'language');
abstract class LanguageTestBase extends ViewsSchemaTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('language');
protected function setUp() {
parent::setUp();
......@@ -64,4 +71,5 @@ protected function dataSet() {
return $data;
}
}
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