braces,method_chaining_indentation.test 1005 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. Integration of fixers: braces,method_chaining_indentation.
  3. --RULESET--
  4. {"braces": true, "method_chaining_indentation": true}
  5. --EXPECT--
  6. <?php
  7. class SomeUnitTest extends PHPUnit\Framework\TestCase
  8. {
  9. public function testSomething()
  10. {
  11. // *Only* the next line is indented wrong _before_ fixing
  12. $this->entity
  13. ->expects($this->once())
  14. ->method('toXml')
  15. ->willReturnCallback(
  16. function (\DOMDocument $dom) {
  17. return $dom->createElement('elem');
  18. });
  19. }
  20. }
  21. --INPUT--
  22. <?php
  23. class SomeUnitTest extends PHPUnit\Framework\TestCase
  24. {
  25. public function testSomething()
  26. {
  27. // *Only* the next line is indented wrong _before_ fixing
  28. $this->entity
  29. ->expects($this->once())
  30. ->method('toXml')
  31. ->willReturnCallback(
  32. function (\DOMDocument $dom) {
  33. return $dom->createElement('elem');
  34. });
  35. }
  36. }