How can I pass Assertions in PHP Codeception?

How can I pass Assertions in PHP Codeception?

Hi Mark!

In order to load the assertions module in your Codeception test, you need to load it like the following in your acceptance.suite.yml.

modules:
    enabled:
        - WebDriver
        - Asserts

You may refer to the following code snippet:

<?php 
namespace _generated;

trait UnitTesterActions
{
    
    abstract protected function getScenario();

    public function assertEquals($expected, $actual, $message = null, $delta = null) {
        return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));
    }

    public function assertNotEquals($expected, $actual, $message = null, $delta = null) {
        return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));
    }
}