StrictFixerTest.php 913 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /*
  3. * This file is part of the PHP CS utility.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace Symfony\CS\Tests\Fixer\Contrib;
  11. use Symfony\CS\Tests\Fixer\AbstractFixerTestBase;
  12. /**
  13. * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
  14. */
  15. class StrictFixerTest extends AbstractFixerTestBase
  16. {
  17. /**
  18. * @dataProvider provideTestFixCases
  19. */
  20. public function testFix($expected, $input = null)
  21. {
  22. $this->makeTest($expected, $input);
  23. }
  24. public function provideTestFixCases()
  25. {
  26. return array(
  27. array('<?php $a === $b;', '<?php $a == $b;'),
  28. array('<?php $a !== $b;', '<?php $a != $b;'),
  29. array('<?php $a !== $b;', '<?php $a <> $b;'),
  30. array('<?php echo "$a === $b";'),
  31. );
  32. }
  33. }