1. Go to this page and download the library: Download toast/unit library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
toast / unit example snippets
/** Description of this group */
return function () : Generator {
/** Test if true == true */
yield function () {
assert(true);
};
};
return function () : Generator {
$obj = new My\Thing\Under\Test;
/** Test method foo */
yield function () use ($obj) {
assert($obj->foo());
};
/** Test method bar */
yield function () use ($obj) {
assert($obj->bar());
};
};
return function () : Generator {
$this->beforeEach(function () {
echo "1\n";
});
yield function () : Generator {
$this->beforeEach(function () {
echo "2\n";
});
yield function () { assert(true); };
};
yield function () {
assert(true);
};
};