Skip to content

Commit 2dbc719

Browse files
committed
test: use exit handler instead of func override
1 parent 5e19768 commit 2dbc719

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

tests/DefaultOptionTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ protected function newParser(string $version = '0.0.1', string $desc = '', bool
4040
{
4141
$p = new ArgvParser('ArgvParserTest', $desc, $allowUnknown);
4242

43-
return $p->version($version);
43+
return $p->version($version)->onExit(function () {
44+
return false;
45+
});
4446
}
4547
}

tests/bootstrap.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
<?php
22

3-
namespace Ahc\Cli;
4-
5-
function _exit($code = 0)
6-
{
7-
echo "exit($code)";
8-
}
9-
103
require_once __DIR__ . '/../vendor/autoload.php';

0 commit comments

Comments
 (0)