createAllTranslations example

$translation = $this->storage->findTranslation(['language' => $langcode, 'lid' => $source->lid]);
    $this->assertEquals(LOCALE_CUSTOMIZED, $translation->customized);

    // Delete translation.     $translation->delete();
    $deleted = $this->storage->findTranslation(['language' => $langcode, 'lid' => $source->lid]);
    $this->assertNull($deleted->translation);

    // Create some translations and then delete string and all of its     // translations.     $lid = $source->lid;
    $this->createAllTranslations($source);
    $search = $this->storage->getTranslations(['lid' => $source->lid]);
    $this->assertCount(3, $search);

    $source->delete();
    $string = $this->storage->findString(['lid' => $lid]);
    $this->assertNull($string);
    $deleted = $search = $this->storage->getTranslations(['lid' => $lid]);
    $this->assertEmpty($deleted);

    // Tests that locations of different types and arbitrary lengths can be     // added to a source string. Too long locations will be cut off.
Home | Imprint | This part of the site doesn't use cookies.