Mutagenesis\Mutation\BooleanAnd::getMutation PHP Method

getMutation() public method

Replace T_BOOLEAN_AND (&&) with T_BOOLEAN_OR (||)
public getMutation ( array $tokens, integer $index ) : array
$tokens array
$index integer
return array
    public function getMutation(array $tokens, $index)
    {
        $tokens[$index][0] = T_BOOLEAN_OR;
        $tokens[$index][1] = '||';
        return $tokens;
    }

Usage Example

 public function testReturnsTokenEquivalentToBooleanOr()
 {
     $mutation = new BooleanAnd(10);
     $this->assertEquals(array(10 => array(T_BOOLEAN_OR, '||')), $mutation->getMutation(array(), 10));
 }
BooleanAnd