PHP code example of komex / unteist
1. Go to this page and download the library: Download komex/unteist 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/ */
komex / unteist example snippets
use \Unteist\Assert\Assert;
class StackTest extends \Unteist\TestCase
{
public function testPushAndPop()
{
$stack = array();
Assert::equals(0, count($stack));
array_push($stack, 'foo');
Assert::equals('foo', $stack[count($stack)-1]);
Assert::equals(1, count($stack));
Assert::equals('foo', array_pop($stack));
Assert::equals(0, count($stack));
}
}