PhpExtractor example


class PhpExtractorTest extends TestCase
{
    /** * @dataProvider resourcesProvider * * @param array|string $resource */
    public function testExtraction($resource)
    {
        // Arrange         $extractor = new PhpExtractor();
        $extractor->setPrefix('prefix');
        $catalogue = new MessageCatalogue('en');

        // Act         $extractor->extract($resource$catalogue);

        $expectedHeredoc = <<<EOF heredoc key with whitespace and escaped \$\n sequences EOF;
        $expectedNowdoc = <<<'EOF' nowdoc key with whitespace and nonescaped \$\n sequences
Home | Imprint | This part of the site doesn't use cookies.