From ebd83f2ec3dde8d4c2a5645aba86002e18cce99e Mon Sep 17 00:00:00 2001
From: Bram Goffings <bramgoffings@gmail.com>
Date: Mon, 30 Jul 2012 09:35:48 +0200
Subject: [PATCH] possible fix for TranslatableTest

---
 lib/Drupal/views/Tests/TranslatableTest.php | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/Drupal/views/Tests/TranslatableTest.php b/lib/Drupal/views/Tests/TranslatableTest.php
index 779804b1709e..8972ec3dcdc8 100644
--- a/lib/Drupal/views/Tests/TranslatableTest.php
+++ b/lib/Drupal/views/Tests/TranslatableTest.php
@@ -40,15 +40,14 @@ public function testUnpackTranslatable() {
     $view = $this->view_unpack_translatable();
     $view->init_localization();
 
-    // localization_plugin returns the plugin_id from the plugin
-    // get_class will go kaboom on a plugin_id I guess...
-    // TODO: fix this with anotation magic
-    $this->assertEqual('LocalizationTest', get_class($view->localization_plugin), 'Make sure that init_localization initializes the right translation plugin');
+    // @todo is this the correct fix?
+    $localization_instance = views_get_plugin('localization', $view->localization_plugin);
+    $this->assertEqual('LocalizationTest', get_class($localization_instance), 'Make sure that init_localization initializes the right translation plugin');
 
     $view->export_locale_strings();
 
     $expected_strings = $this->strings;
-    $result_strings = $view->localization_plugin->get_export_strings();
+    $result_strings = $localization_instance->get_export_strings();
     $this->assertEqual(sort($expected_strings), sort($result_strings), 'Make sure that the localization plugin got every translatable string.');
   }
 
-- 
GitLab