Commit a4127f24 authored by catch's avatar catch

Issue #2238651 by chx: LocaleStringTest is incorrectly asserting source...

Issue #2238651 by chx: LocaleStringTest is incorrectly asserting source strings instead of translations.
parent ca560672
......@@ -8,8 +8,6 @@
namespace Drupal\locale\Tests;
use Drupal\Core\Language\Language;
use Drupal\locale\SourceString;
use Drupal\locale\TranslationString;
use Drupal\simpletest\WebTestBase;
/**
......@@ -173,7 +171,7 @@ function testStringSearchAPI() {
// Load Spanish translations using string filter.
$filter_options['filters'] = array('source' => $prefix);
$translations = $this->storage->getTranslations(array('language' => 'es'), $filter_options);
$this->assertEqual(count($strings), 2, 'Found 2 translations using some string filter.');
$this->assertEqual(count($translations), 2, 'Found 2 translations using some string filter.');
}
......@@ -205,7 +203,7 @@ function createAllTranslations($source, $values = array()) {
* Creates single translation for source string.
*/
function createTranslation($source, $langcode, $values = array()) {
return $this->storage->createTranslation($values += array(
return $this->storage->createTranslation($values + array(
'lid' => $source->lid,
'language' => $langcode,
'translation' => $this->randomName(100),
......
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