lithium\tests\cases\g11n\catalog\adapter\CodeTest::testReadMessageTemplateTNoEscapingLineEnding PHP Метод

testReadMessageTemplateTNoEscapingLineEnding() публичный Метод

Due to different EOL handling on linux and windows, combined with the git config core.autocrlf setting, the test file may be written with either LF or CRLF as line endings, which has an effect on the key where the data is stored.
    public function testReadMessageTemplateTNoEscapingLineEnding()
    {
        $results = $this->adapter->read('messageTemplate', 'root', null);
        $expectedLR = "escaping\n\t4";
        $expectedCRLF = "escaping\r\n\t4";
        $isSet = isset($results["escaping\n\t4"]['ids']['singular']);
        $assertLR = $isSet && $results["escaping\n\t4"]['ids']['singular'] === $expectedLR;
        $isSet = isset($results["escaping\r\n\t4"]['ids']['singular']);
        $assertCRLF = $isSet && $results["escaping\r\n\t4"]['ids']['singular'] === $expectedCRLF;
        $this->assertTrue($assertLR || $assertCRLF);
    }