Phalcon\Test\Unit\EscaperTest::testNormalizeEncoding PHP Method

testNormalizeEncoding() public method

Tests the normalizeEncoding
Since: 2014-09-16
Author: Nikolaos Dimopoulos ([email protected])
    public function testNormalizeEncoding()
    {
        $this->specify('The escaper with normalizeEncoding does not return the correct result ', function () {
            if (!extension_loaded('mbstring')) {
                $this->markTestSkipped('Warning: mbstring extension is not loaded');
            }
            $escaper = new Escaper();
            expect($escaper->normalizeEncoding('Hello'))->equals(mb_convert_encoding('Hello', 'UTF-32', 'UTF-8'));
        });
    }