TranslationWrapperTest.php

Same filename and directory in other branches
  1. 9 core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php
  2. 10 core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php

Namespace

Drupal\Tests\Core\StringTranslation

File

core/tests/Drupal/Tests/Core/StringTranslation/TranslationWrapperTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\Core\StringTranslation;

use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\StringTranslation\TranslationWrapper;
use Drupal\Tests\UnitTestCase;

/**
 * Tests the TranslationWrapper backward compatibility layer.
 *
 * @coversDefaultClass \Drupal\Core\StringTranslation\TranslationWrapper
 * @group StringTranslation
 */
class TranslationWrapperTest extends UnitTestCase {
    
    /**
     * @covers ::__construct
     */
    public function testTranslationWrapper() : void {
        $object = new TranslationWrapper('Backward compatibility');
        $this->assertInstanceOf(TranslatableMarkup::class, $object);
    }

}

Classes

Title Deprecated Summary
TranslationWrapperTest Tests the TranslationWrapper backward compatibility layer.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.