@Halleck45
<?php
class Foo {
public function bar($x, $y) {
if($x == 1) {
echo 'A';
} else {
echo 'B';
}
if($y == 1) {
echo 'C';
} else {
echo 'D';
}
}
}<?php
class FooTest extends PHPUnit_Framework_TestCase
{
public function testFoo1()
{
$this->assertTrue(true);
}
}if($x === 1) { (...) }if($x !== 1) { (...) }On introduit une mutation
Les tests DOIVENT échouer