<?php
use Testify\Testify;
$testify = new Testify("Test ArrayObject Class");
$testify->test("correct array access test", function($testify) {
$ao = new ArrayObject([1]);
$testify->assert($ao[0] == 1);
});
$testify->test("wrong array access test", function($testify) {
$ao = new ArrayObject([1]);
$testify->assert($ao[0] == 2);
});
$testify->run();
Result
--------------------------------------------------------------------------------
Test ArrayObject Class [fail]
--------------------------------------------------------------------------------
[fail] correct array access test {pass 1 / fail 0}
[pass] assertTrue()
line 179, Testify.php
return $this->assertTrue($arg, $message);
--------------------------------------------------------------------------------
[fail] wrong array access test {pass 0 / fail 1}
[fail] assertTrue()
line 179, Testify.php
return $this->assertTrue($arg, $message);
================================================================================
Tests: [fail], {pass 1 / fail 1}, 50% success