for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class ValidatorTest extends \PHPUnit\Framework\TestCase
{
public function testValidateTrueFalse()
$test = true;
$validator = new \Suricate\Validator($test);
$validator->true("Not true");
true()
Suricate\Validator
__call
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$validator->/** @scrutinizer ignore-call */
true("Not true");
$this->assertSame(0, count($validator->getErrors()));
$this->assertTrue($validator->pass());
$this->assertFalse($validator->fails());
$validator->false("Not false");
false()
false("Not false");
$this->assertSame(1, count($validator->getErrors()));
$this->assertFalse($validator->pass());
$this->assertTrue($validator->fails());
$this->assertSame("Not false", $validator->getErrors()[0]);
}