nur-ture/tests/app/cli/AolistTest.php

61 lines
1.0 KiB
PHP

<?php
namespace nulib\app\cli;
use nur\t\TestCase;
class AolistTest extends TestCase {
function testGroup() {
$aogroup = new Aogroup([
"group",
["--gopt1"],
["--gopt2"],
], true);
echo "$aogroup\n";
self::assertTrue(true);
}
function testSection() {
$aosection = new Aosection([
["--sopt"],
["group",
["--sgopt1"],
["--sgopt2"],
],
], true);
echo "$aosection\n";
self::assertTrue(true);
}
function testList() {
$aolist = new class([
"param" => "value",
["--opt"],
["group",
["--gopt1"],
["--gopt2"],
],
"sections" => [
[
["--s0opt"],
["group",
["--s0gopt1"],
["--s0gopt2"],
],
],
"ns" => [
["--nsopt"],
["group",
["--nsgopt1"],
["--nsgopt2"],
],
],
],
]) extends Aolist {};
echo "$aolist\n";
self::assertTrue(true);
}
}