Mmoreram\PHPFormatter\Tests\Fixer\StrictFixerTest::testFix PHP Method

testFix() public method

Test fixer.
public testFix ( $data, $withHeader, $strict )
    public function testFix($data, $withHeader, $strict)
    {
        $fixedDataExpected = '<?php' . ($withHeader ? '

/**
 * Header
 */' : '') . '

' . (is_bool($strict) ? 'declare(strict_types=' . ($strict ? '1' : '0') . ');

' : '') . "namespace 'namespace';";
        $strictFixer = new StrictFixer($strict);
        $fixedData = $strictFixer->fix($data);
        $this->assertEquals($fixedDataExpected, $fixedData);
    }
StrictFixerTest