Skip to content

Commit

Permalink
Add tests to check binary coalesce is not mutated by null assign coal…
Browse files Browse the repository at this point in the history
…esce mutator
  • Loading branch information
maks-rafalko committed Feb 18, 2019
1 parent 0b0babf commit 3028cc2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Mutator/Operator/AssignCoalesceTest.php
Expand Up @@ -93,5 +93,14 @@ public function provideMutationCases(): \Generator
$a['value'] = $var;
PHP
];

yield 'Does not mutate coalesce binary operator' => [
<<<'PHP'
<?php
$a['value'] = $foo ?? $bar;
PHP
,
];
}
}

0 comments on commit 3028cc2

Please sign in to comment.