public function testValidate()
{
$this->args->compile([["r", "required-option", "This option is required", CliArgs::REQUIRED | CliArgs::NOARG]]);
foreach ($this->args->parse(0, []) as $error) {
throw new \Exception("Unexpected parse error: {$error}");
}
foreach ($this->args->validate() as $error) {
$this->assertStringMatchesFormat("%srequired-option%srequired", $error);
}
$this->assertTrue(isset($error));
}