public function testFix()
{
$data = '<?php
/**
* This file is part of the php-formatter package
*
* Copyright (c) 2014 Marc Morera
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Marc Morera <[email protected]>
*/
declare(strict_types=1);';
$header = '/**
* This file is part of the php-formatter package
*
* Copyright (c) 2014 Marc Morera
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Marc Morera <[email protected]>
*/
';
$fixedDataExpected = '<?php
/**
* This file is part of the php-formatter package
*
* Copyright (c) 2014 Marc Morera
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Marc Morera <[email protected]>
*/
declare(strict_types=1);';
$headerFixer = new HeaderFixer($header);
$fixedData = $headerFixer->fix($data);
$fixedData = $headerFixer->fix($fixedData);
$this->assertEquals($fixedDataExpected, $fixedData);
}