UnitTester::assertNull PHP Method

assertNull() public method

Checks that variable is NULL
See also: Codeception\Module\Asserts::assertNull()
public assertNull ( $actual, string $message = null )
$actual
$message string
    public function assertNull($actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));
    }

Usage Example

 public function testGetSetReport()
 {
     $task = new PhpcsLintFiles();
     $this->tester->assertNull($task->getReport('full'), 'default value');
     $task = new PhpcsLintFiles(['reports' => ['full' => 'a']]);
     $this->tester->assertEquals('a', $task->getReport('full'), 'set in constructor');
     $task->setReport('full', 'b');
     $this->tester->assertEquals('b', $task->getReport('full'), 'normal');
 }
All Usage Examples Of UnitTester::assertNull