minor #10411 [Process] Fix comparisons against process exitcode (romainneutron)
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] Fix comparisons against process exitcode
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Use identical comparison instead of equal. In case the exitcode has not been caught, `Process::isSuccessful` returns true instead of false. It should not happen, but it's much more clean like that.
Commits
-------
d66f63f
[Process] Use assertSame instead of assertEquals to avoid comparison against `null`
This commit is contained in:
commit
6fcf5d37a3
@ -280,7 +280,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$process = $this->getProcess('php -m');
|
$process = $this->getProcess('php -m');
|
||||||
$process->run();
|
$process->run();
|
||||||
$this->assertEquals(0, $process->getExitCode());
|
$this->assertSame(0, $process->getExitCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testStatus()
|
public function testStatus()
|
||||||
|
Reference in New Issue
Block a user