Mutagenesis\Mutation\BooleanTrue::getMutation PHP Method

getMutation() public method

Replace boolean TRUE with FALSE
public getMutation ( array $tokens, integer $index ) : array
$tokens array
$index integer
return array
    public function getMutation(array $tokens, $index)
    {
        $tokens[$index][0] = T_STRING;
        $tokens[$index][1] = 'false';
        return $tokens;
    }

Usage Example

 public function testReturnsTokenEquivalentToFalse()
 {
     $mutation = new BooleanTrue(10);
     $this->assertEquals(array(10 => array(T_STRING, 'false')), $mutation->getMutation(array(), 10));
 }
BooleanTrue