Tested SingleUserPasswordAuthCallback, improved ServerTest

This commit is contained in:
Barnaby Walters
2021-06-13 15:24:17 +02:00
parent 74a5797c30
commit ca1819776e
4 changed files with 29 additions and 20 deletions

View File

@@ -2,6 +2,7 @@
namespace Taproot\IndieAuth\Test;
use BadMethodCallException;
use DirectoryIterator;
use Exception;
use Nyholm\Psr7\Response;
@@ -129,11 +130,11 @@ class ServerTest extends TestCase {
['authorizationForm' => 'not an auth form instance']
];
foreach ($badConfigs as $badConfig) {
foreach ($badConfigs as $testId => $badConfig) {
try {
$this->getDefaultServer($badConfig);
$this->fail();
} catch (Exception $e) {
$this->fail("Test case {$testId} failed.");
} catch (BadMethodCallException $e) {
$this->assertTrue(true);
}
}