diff --git a/nur_src/cli/Application.php b/nur_src/cli/Application.php index 55d6989..65f975d 100644 --- a/nur_src/cli/Application.php +++ b/nur_src/cli/Application.php @@ -12,7 +12,7 @@ use nur\path; use nur\sery\app\launcher; use nur\sery\app\RunFile; use nur\sery\cl; -use nur\sery\app\app; +use nur\sery\app; use nur\sery\output\log as nlog; use nur\sery\output\msg as nmsg; use nur\sery\output\console as nconsole; diff --git a/src/app/app.php b/src/app.php similarity index 99% rename from src/app/app.php rename to src/app.php index 5ddbfcb..0e1f04f 100644 --- a/src/app/app.php +++ b/src/app.php @@ -1,15 +1,12 @@ 0) { - msg::print("step $step"); - sleep(1); - } - } -} diff --git a/tests/wip/app/argsTest.php b/tests/app/argsTest.php similarity index 97% rename from tests/wip/app/argsTest.php rename to tests/app/argsTest.php index 8a8b1f1..b2bdef1 100644 --- a/tests/wip/app/argsTest.php +++ b/tests/app/argsTest.php @@ -1,6 +1,6 @@ false])); - self::assertSame(["--a"], launcher::verifix_args(["a" => true])); - self::assertSame(["--a", "value"], launcher::verifix_args(["a" => "value"])); - self::assertSame(["--a", "52"], launcher::verifix_args(["a" => 52])); - self::assertSame(["--aa-bb", "value"], launcher::verifix_args(["aaBb" => "value"])); - self::assertSame(["--aa-bb", "value"], launcher::verifix_args(["aa-Bb" => "value"])); - self::assertSame(["--aa-bb", "value"], launcher::verifix_args(["aa_Bb" => "value"])); - self::assertSame(["---aa-bb", "value"], launcher::verifix_args(["_aa_Bb" => "value"])); - } -} diff --git a/tests/wip/app/app2Test.php b/tests/appTest.php similarity index 85% rename from tests/wip/app/app2Test.php rename to tests/appTest.php index a5bcf29..8fbac6a 100644 --- a/tests/wip/app/app2Test.php +++ b/tests/appTest.php @@ -1,12 +1,12 @@ "$projdir/devel/var", "logdir" => "$projdir/devel/log", "profile" => "devel", + "appgroup" => null, "name" => "my-application1", "title" => null, ], $app1->getParams()); @@ -44,6 +45,7 @@ namespace nur\sery\wip\app { "vardir" => "$projdir/devel/var", "logdir" => "$projdir/devel/log", "profile" => "devel", + "appgroup" => null, "name" => "my-application2", "title" => null, ], $app2->getParams()); @@ -68,6 +70,7 @@ namespace nur\sery\wip\app { "vardir" => "$projdir/devel/var", "logdir" => "$projdir/devel/log", "profile" => "devel", + "appgroup" => null, "name" => "my-application1", "title" => null, ], myapp::get()->getParams()); @@ -86,6 +89,7 @@ namespace nur\sery\wip\app { "vardir" => "$projdir/devel/var", "logdir" => "$projdir/devel/log", "profile" => "devel", + "appgroup" => null, "name" => "my-application2", "title" => null, ], myapp::get()->getParams()); @@ -93,13 +97,14 @@ namespace nur\sery\wip\app { } } -namespace nur\sery\wip\app\impl { - use nur\cli\Application2; +namespace nur\sery\impl { + + use nur\sery\app\cli\Application; use nur\sery\os\path; - use nur\sery\app\app; + use nur\sery\app; class config { - const PROJDIR = __DIR__.'/../../..'; + const PROJDIR = __DIR__.'/..'; static function get_projdir(): string { return path::abspath(self::PROJDIR); @@ -112,13 +117,13 @@ namespace nur\sery\wip\app\impl { } } - class MyApplication1 extends Application2 { + class MyApplication1 extends Application { const PROJDIR = config::PROJDIR; function main() { } } - class MyApplication2 extends Application2 { + class MyApplication2 extends Application { const PROJDIR = null; function main() { diff --git a/tests/wip/app/appTest.php b/tests/wip/app/appTest.php deleted file mode 100644 index 4ea66a4..0000000 --- a/tests/wip/app/appTest.php +++ /dev/null @@ -1,18 +0,0 @@ -call($app, "$name")); - } -} diff --git a/wip_app/cli/Application.php b/wip_app/cli/Application.php index 9c43c53..0f3d3d5 100644 --- a/wip_app/cli/Application.php +++ b/wip_app/cli/Application.php @@ -5,7 +5,7 @@ use Exception; use nur\cli\ArgsException; use nur\cli\ArgsParser; use nur\config; -use nur\sery\app\app; +use nur\sery\app; use nur\sery\app\RunFile; use nur\sery\ExitError; use nur\sery\output\console;