Commit 6f392976 authored by dawehner's avatar dawehner Committed by tim.plunkett
Browse files

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

parent 4c0755df
...@@ -13,7 +13,12 @@ ...@@ -13,7 +13,12 @@
* Tests Views pluggable translations. * Tests Views pluggable translations.
*/ */
class TranslatableTest extends ViewsSqlTest { class TranslatableTest extends ViewsSqlTest {
var $strings; /**
* Stores the strings, which are tested by this test.
*
* @var array
*/
protected $strings;
public static function getInfo() { public static function getInfo() {
return array( return array(
...@@ -23,7 +28,7 @@ public static function getInfo() { ...@@ -23,7 +28,7 @@ public static function getInfo() {
); );
} }
public function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
config('views.settings')->set('views_localization_plugin', 'test_localization')->save(); config('views.settings')->set('views_localization_plugin', 'test_localization')->save();
...@@ -73,7 +78,9 @@ public function testTranslation() { ...@@ -73,7 +78,9 @@ public function testTranslation() {
foreach ($this->strings as $string) { foreach ($this->strings as $string) {
$expected_strings[] = $string .= '-translated'; $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 @@ public static function getInfo() { ...@@ -23,13 +23,14 @@ public static function getInfo() {
* Tests the jump menu style plugin. * Tests the jump menu style plugin.
*/ */
function testJumpMenus() { function testJumpMenus() {
views_invalidate_cache();
// We'll run this test for several different base tables that appear in the // We'll run this test for several different base tables that appear in the
// wizard. // wizard.
$base_table_methods = array( $base_table_methods = array(
'node' => 'createNodeAndGetPath', 'node' => 'createNodeAndGetPath',
'users' => 'createUserAndGetPath', 'users' => 'createUserAndGetPath',
'comment' => 'createCommentAndGetPath', 'comment' => 'createCommentAndGetPath',
'taxonomy_term' => 'createTaxonomyTermAndGetPath', 'taxonomy_term_data' => 'createTaxonomyTermAndGetPath',
'file_managed' => 'createFileAndGetPath', 'file_managed' => 'createFileAndGetPath',
'node_revision' => 'createNodeRevisionAndGetPath', 'node_revision' => 'createNodeRevisionAndGetPath',
); );
......
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