class PoStreamReaderTest
Unit tests for the Gettext PO file header handling features.
Attributes
#[Group('Gettext')]
Hierarchy
- class \Drupal\Tests\Component\Gettext\PoStreamReaderTest extends \PHPUnit\Framework\TestCase
Expanded class hierarchy of PoStreamReaderTest
See also
Drupal\Component\Gettext\PoHeader.
File
-
core/
tests/ Drupal/ Tests/ Component/ Gettext/ PoStreamReaderTest.php, line 16
Namespace
Drupal\Tests\Component\GettextView source
class PoStreamReaderTest extends TestCase {
/**
* Validates that calling open with an invalid URI throws an exception.
*/
public function testOpeningFileError() : void {
$reader = new PoStreamReader();
$reader->setURI('fake');
$this->expectException(\RuntimeException::class);
$this->expectExceptionMessage('Cannot open stream for uri fake');
$reader->open();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.