Created
August 19, 2012 08:19
-
-
Save b-durand/3393635 to your computer and use it in GitHub Desktop.
CS: PSR-2 P4.6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ControlSpacesFixerTest extends \PHPUnit_Framework_TestCase | |
{ | |
/* ... */ | |
/** | |
* @dataProvider testFixCallsProvider | |
*/ | |
public function testFixCalls($call, $callFixed) | |
{ | |
$fixer = new Fixer(); | |
$this->assertEquals($callFixed, $fixer->fix($this->getFileMock(), $call)); | |
$this->assertEquals($callFixed, $fixer->fix($this->getFileMock(), $callFixed)); | |
} | |
public function testFixCallsProvider() | |
{ | |
return array( | |
array('Foo::baz ($bar)', 'Foo::baz($bar)'), | |
array('Foo::baz( $bar )', 'Foo::baz($bar)'), | |
array('Foo::baz( $bar)', 'Foo::baz($bar)'), | |
array('Foo::baz($bar )', 'Foo::baz($bar)'), | |
array('bar($foo,$baz)', 'bar($foo, $baz)'), | |
array('bar($foo ,$baz)', 'bar($foo, $baz)'), | |
array('bar($foo , $baz)', 'bar($foo, $baz)'), | |
); | |
} | |
/* ... */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment