fixed wrong base-table name for the taxonomy wizard and improved the translation test.

8.0.x
Daniel Wehner 2012-08-14 18:39:52 +02:00 committed by Tim Plunkett
parent 4c0755df14
commit 6f39297639
2 changed files with 12 additions and 4 deletions

View File

@ -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');
}
/**

View File

@ -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',
);