* * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace Symfony\CS\Tests\Fixer\Contrib; use Symfony\CS\Tests\Fixer\AbstractFixerTestBase; /** * @author John Kelly * @author Graham Campbell * @author Dariusz RumiƄski */ class MultilineSpacesBeforeSemicolonFixerTest extends AbstractFixerTestBase { /** * @dataProvider provideCases */ public function testFix($expected, $input = null) { $this->makeTest($expected, $input); } public function provideCases() { return array( array( 'setName(\'readme1\') ->setDescription(\'Generates the README\'); ', 'setName(\'readme1\') ->setDescription(\'Generates the README\') ; ', ), array( 'setName(\'readme2\') ->setDescription(\'Generates the README\'); ', 'setName(\'readme2\') ->setDescription(\'Generates the README\') ; ', ), array( 'foo(\'with param containing ;\') ;" ;', ), array( 'foo();', ), array( 'foo() ;', ), array( 'foo(\'with param containing ;\') ;', ), array( 'foo(\'with param containing ) ; \') ;', ), array( 'foo("with param containing ) ; ") ; ?>', ), array( 'foo("with semicolon in string) ; "); ?>', ), array( 'example();', 'example() ;', ), ); } }