Skip to content

Commit

Permalink
minor #4210 [7.3] PhpUnitConstructFixer - add test for PHP 7.3 (kubaw…
Browse files Browse the repository at this point in the history
…erlos)

This PR was merged into the 2.12 branch.

Discussion
----------

[7.3] PhpUnitConstructFixer - add test for PHP 7.3

Commits
-------

52b0674 [7.3] PhpUnitConstructFixer - add test for PHP 7.3
  • Loading branch information
keradus committed Jan 4, 2019
2 parents 064d104 + 52b0674 commit 30b30c4
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/Fixer/PhpUnit/PhpUnitConstructFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,32 @@ public function testInvalidConfig()
$this->fixer->configure(['assertions' => ['__TEST__']]);
}

/**
* @param string $expected
* @param string $input
*
* @requires PHP 7.3
* @dataProvider provideFix73Cases
*/
public function testFix73($expected, $input)
{
$this->doTest($expected, $input);
}

public function provideFix73Cases()
{
return [
[
'<?php $this->assertTrue($a, );',
'<?php $this->assertSame(true, $a, );',
],
[
'<?php $this->assertTrue($a, $message , );',
'<?php $this->assertSame(true, $a, $message , );',
],
];
}

private function generateCases($expectedTemplate, $inputTemplate)
{
$cases = [];
Expand Down

0 comments on commit 30b30c4

Please sign in to comment.