public function testReformatSuccessful() { $content = file_get_contents('ScriptReorganizer/Tests/files/sample.php', true); $expected = '<?php' . (include 'ScriptReorganizer/Tests/files/expectedRoutedScript.php') . '?>'; $strategy = new ScriptReorganizer_Strategy_Route(); $this->assertTrue($expected === $strategy->reformat($content)); }
public function testReformatSuccessful() { $os = PHP_EOL == "\r\n" ? '-win' : ( PHP_EOL == "\n" ? '-unix' : '-mac' ); $content = file_get_contents( 'ScriptReorganizer/Tests/files/sample' . $os . '.php', true ); $eol = $this->getEolStyle( $content ); $expected = $eol . '<?php' . ( include 'ScriptReorganizer/Tests/files/expectedRoutedScript.php' ) . '?>' . $eol; $strategy = new ScriptReorganizer_Strategy_Route; $this->assertTrue( $expected === $strategy->reformat( $content, $eol ) ); }