Tester\Assert::equal PHP Method

equal() public static method

Checks assertion. The identity of objects and the order of keys in the arrays are ignored.
public static equal ( $expected, $actual, $description = NULL ) : void
return void
    public static function equal($expected, $actual, $description = NULL)
    {
        self::$counter++;
        if (!self::isEqual($expected, $actual)) {
            self::fail(self::describe('%1 should be equal to %2', $description), $actual, $expected);
        }
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @eventListener onFoo
  * @param int $one
  * @param int $two
  * @param int $three
  */
 public function onFoo($one, $two, $three)
 {
     Assert::equal(1, $one);
     Assert::equal(2, $two);
     Assert::equal(3, $three);
     $this->called = TRUE;
 }
All Usage Examples Of Tester\Assert::equal