Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class MethodRegistryTest extends SapphireTest |
||
13 | { |
||
14 | public function testGetAllMethodsReturnsRegisteredMethods() |
||
15 | { |
||
16 | Config::modify()->set(MethodRegistry::class, 'methods', [Method::class]); |
||
17 | $registry = MethodRegistry::singleton(); |
||
18 | $methods = $registry->getAllMethods(); |
||
19 | |||
20 | $this->assertCount(1, $methods); |
||
21 | $this->assertInstanceOf(Method::class, reset($methods)); |
||
|
|||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @expectedException UnexpectedValueException |
||
26 | * @expectedExceptionMessage Given method "SilverStripe\Security\Member" does not implement SilverStripe\MFA\Method\MethodInterface |
||
27 | */ |
||
28 | public function testInvalidMethodsThrowExceptions() |
||
33 | } |
||
34 | } |
||
35 |