diff --git a/CHANGELOG b/CHANGELOG index f3baeb21..edc4b0ab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +Version 0.8.0 (2019-??-??) +========================== + +New features: +- Support for the Fever protocol (see README.md for details) +- Command line functionality for clearing a password, disabling the account +- Command line options for dealing with Fever passwords + Version 0.7.1 (2019-03-25) ========================== diff --git a/lib/CLI.php b/lib/CLI.php index 85ee8044..96936980 100644 --- a/lib/CLI.php +++ b/lib/CLI.php @@ -115,7 +115,7 @@ USAGE_TEXT; } protected function userManage($args): int { - switch ($this->command(["add", "remove", "set-pass", "list", "auth"], $args)) { + switch ($this->command(["add", "remove", "set-pass", "unset-pass", "list", "auth"], $args)) { case "add": return $this->userAddOrSetPassword("add", $args[""], $args[""]); case "set-pass": @@ -130,7 +130,7 @@ USAGE_TEXT; } case "unset-pass": if ($args['--fever']) { - $this->getFever()->unegister($args[""]); + $this->getFever()->unregister($args[""]); } else { Arsse::$user->passwordUnset($args[""], $args["--oldpass"]); } diff --git a/tests/cases/CLI/TestCLI.php b/tests/cases/CLI/TestCLI.php index 9a2d622c..3f1c3d30 100644 --- a/tests/cases/CLI/TestCLI.php +++ b/tests/cases/CLI/TestCLI.php @@ -261,9 +261,9 @@ class TestCLI extends \JKingWeb\Arsse\Test\AbstractTest { }; // FIXME: Phake is somehow unable to mock the User class correctly, so we use PHPUnit's mocks instead Arsse::$user = $this->createMock(User::class); - Arsse::$user->method("passwordUnet")->will($this->returnCallback($passwordChange)); + Arsse::$user->method("passwordUnset")->will($this->returnCallback($passwordClear)); $fever = \Phake::mock(FeverUser::class); - \Phake::when($fever)->unregister->thenReturnCallback($passwordChange); + \Phake::when($fever)->unregister->thenReturnCallback($passwordClear); \Phake::when($this->cli)->getFever->thenReturn($fever); $this->assertConsole($this->cli, $cmd, $exitStatus, $output); }