Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/Store/SessionStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ public function getMethod(): ?string
*/
public function setMethod(?string $method): StoreInterface
{
if (in_array($method, $this->getVerifiedMethods() ?? [])) {
throw new InvalidMethodException('You cannot verify with a method you have already verified');
}

$this->method = $method;

return $this;
Expand Down
9 changes: 0 additions & 9 deletions tests/php/Store/SessionStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ public function testAddState()
$this->assertSame(['foo' => 'baz', 'bar' => 'baz'], $store->getState());
}

public function testSetMethodWithVerifiedMethod()
{
$this->expectException(\SilverStripe\MFA\Exception\InvalidMethodException::class);
$this->expectExceptionMessage('You cannot verify with a method you have already verified');
$store = new SessionStore($this->createMock(Member::class));
$store->addVerifiedMethod('foobar');
$store->setMethod('foobar');
}

public function testSetMethod()
{
$store = new SessionStore($this->createMock(Member::class));
Expand Down