PHP code example of hershel-theodore-layton / test-chain
1. Go to this page and download the library: Download hershel-theodore-layton/test-chain 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/ */
hershel-theodore-layton / test-chain example snippets
HACK
<<TestChain\Discover>>
function passing_test(TestChain\Chain $chain)[]: TestChain\Chain {
return $chain->group(__FUNCTION__)
->testWith3Params(
'division',
() ==> vec[
tuple(8, 2, 4),
tuple(12, 3, 4),
],
($a, $b, $expected) ==> {
if ($a / $b !== $expected) {
throw new \LogicException('math broke');
}
},
);
}