For this array ($options):
Array (
[0] => 0
[1] => 1
[2] => 2
)
PHP returns TRUE:
$this->assertTrue( in_array('Bug', $options ) ); // TRUE
$this->assertTrue( in_array('Feature', $options ) ); // TRUE
$this->assertTrue( in_array('Task', $options ) ); // TRUE
$this->assertTrue( in_array('RockAndRoll', $options ) ); // TRUE
Why?
This is because
0 == "string"is true, and0is an element of the array.Set the parameter
$strictinin_arrayto true: