-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Priority: Braces before MethodChainingIndentation
- Loading branch information
1 parent
d1e1ae2
commit c0358e8
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
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
37 changes: 37 additions & 0 deletions
37
tests/Fixtures/Integration/priority/braces,method_chaining_indentation.test
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--TEST-- | ||
Integration of fixers: braces,method_chaining_indentation. | ||
--RULESET-- | ||
{"braces": true, "method_chaining_indentation": true} | ||
--EXPECT-- | ||
<?php | ||
class SomeUnitTest extends PHPUnit\Framework\TestCase | ||
{ | ||
public function testSomething() | ||
{ | ||
// *Only* the next line is indented wrong _before_ fixing | ||
$this->entity | ||
->expects($this->once()) | ||
->method('toXml') | ||
->willReturnCallback( | ||
function (\DOMDocument $dom) { | ||
return $dom->createElement('elem'); | ||
}); | ||
} | ||
} | ||
|
||
--INPUT-- | ||
<?php | ||
class SomeUnitTest extends PHPUnit\Framework\TestCase | ||
{ | ||
public function testSomething() | ||
{ | ||
// *Only* the next line is indented wrong _before_ fixing | ||
$this->entity | ||
->expects($this->once()) | ||
->method('toXml') | ||
->willReturnCallback( | ||
function (\DOMDocument $dom) { | ||
return $dom->createElement('elem'); | ||
}); | ||
} | ||
} |