You are here

public function UnicodeTest::testStatus in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php \Drupal\Tests\Component\Utility\UnicodeTest::testStatus()

Getting and settings the multibyte environment status.

@dataProvider providerTestStatus @covers ::getStatus @covers ::setStatus

File

core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php, line 39
Contains \Drupal\Tests\Component\Utility\UnicodeTest.

Class

UnicodeTest
Test unicode handling features implemented in Unicode component.

Namespace

Drupal\Tests\Component\Utility

Code

public function testStatus($value, $expected, $invalid = FALSE) {
  if ($invalid) {
    $this
      ->setExpectedException('InvalidArgumentException');
  }
  Unicode::setStatus($value);
  $this
    ->assertEquals($expected, Unicode::getStatus());
}