fixed wrong base-table name for the taxonomy wizard and improved the translation test.
parent
4c0755df14
commit
6f39297639
|
@ -13,7 +13,12 @@ use Drupal\views\View;
|
|||
* Tests Views pluggable translations.
|
||||
*/
|
||||
class TranslatableTest extends ViewsSqlTest {
|
||||
var $strings;
|
||||
/**
|
||||
* Stores the strings, which are tested by this test.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $strings;
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
|
@ -23,7 +28,7 @@ class TranslatableTest extends ViewsSqlTest {
|
|||
);
|
||||
}
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
config('views.settings')->set('views_localization_plugin', 'test_localization')->save();
|
||||
|
@ -73,7 +78,9 @@ class TranslatableTest extends ViewsSqlTest {
|
|||
foreach ($this->strings as $string) {
|
||||
$expected_strings[] = $string .= '-translated';
|
||||
}
|
||||
$this->assertEqual(sort($expected_strings), sort($view->localization_plugin->translated_strings), 'Make sure that every string got loaded translated');
|
||||
sort($expected_strings);
|
||||
sort($view->localization_plugin->translated_strings);
|
||||
$this->assertEqual($expected_strings, $view->localization_plugin->translated_strings, 'Make sure that every string got loaded translated');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,13 +23,14 @@ class WizardJumpMenuTest extends WizardTestBase {
|
|||
* Tests the jump menu style plugin.
|
||||
*/
|
||||
function testJumpMenus() {
|
||||
views_invalidate_cache();
|
||||
// We'll run this test for several different base tables that appear in the
|
||||
// wizard.
|
||||
$base_table_methods = array(
|
||||
'node' => 'createNodeAndGetPath',
|
||||
'users' => 'createUserAndGetPath',
|
||||
'comment' => 'createCommentAndGetPath',
|
||||
'taxonomy_term' => 'createTaxonomyTermAndGetPath',
|
||||
'taxonomy_term_data' => 'createTaxonomyTermAndGetPath',
|
||||
'file_managed' => 'createFileAndGetPath',
|
||||
'node_revision' => 'createNodeRevisionAndGetPath',
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue