Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace Pagekit\Filter\Tests; use Pagekit\Filter\StripNewlinesFilter; class Str..

Decoded Output download

<?php

namespace Pagekit\Filter\Tests;

use Pagekit\Filter\StripNewlinesFilter;

class StripNewlinesTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @dataProvider provideNewLineStrings
     */
    public function testFilter($input, $output)
    {
        $filter = new StripNewlinesFilter;

        $this->assertEquals($output, $filter->filter($input));
    }

    /**
     * @return array
     */
    public function provideNewLineStrings()
    {
        return [
            ['', ''],
            ["
", ''],
            ["
", ''],
            ["
", ''],
            ['
', '
'],
            ['
', '
'],
            ['
', '
'],
            ["These newlines should
be removed by
the filter", 'These newlines shouldbe removed bythe filter']
        ];
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Pagekit\Filter\Tests;

use Pagekit\Filter\StripNewlinesFilter;

class StripNewlinesTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @dataProvider provideNewLineStrings
     */
    public function testFilter($input, $output)
    {
        $filter = new StripNewlinesFilter;

        $this->assertEquals($output, $filter->filter($input));
    }

    /**
     * @return array
     */
    public function provideNewLineStrings()
    {
        return [
            ['', ''],
            ["\n", ''],
            ["\r", ''],
            ["\r\n", ''],
            ['\n', '\n'],
            ['\r', '\r'],
            ['\r\n', '\r\n'],
            ["These newlines should\nbe removed by\r\nthe filter", 'These newlines shouldbe removed bythe filter']
        ];
    }
}

Function Calls

None

Variables

None

Stats

MD5 455354b9e9afa11cabee6d242a714d92
Eval Count 0
Decode Time 101 ms