File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Tests \Unit ;
6+
7+ use CodeIgniter \Shield \Authentication \Actions \EmailActivator ;
8+ use CodeIgniter \Shield \Exceptions \RuntimeException ;
9+ use Config \Services ;
10+ use Tests \Support \TestCase ;
11+
12+ /**
13+ * @internal
14+ */
15+ final class EmailActivatorTest extends TestCase
16+ {
17+ public function testShowCannotGetPendingLoginUser (): void
18+ {
19+ $ this ->expectException (RuntimeException::class);
20+ $ this ->expectExceptionMessage ('Cannot get the pending login User ' );
21+
22+ $ activator = new EmailActivator ();
23+
24+ $ activator ->show ();
25+ }
26+
27+ public function testVerifyCannotGetPendingLoginUser (): void
28+ {
29+ $ this ->expectException (RuntimeException::class);
30+ $ this ->expectExceptionMessage ('Cannot get the pending login User ' );
31+
32+ $ activator = new EmailActivator ();
33+ $ request = Services::incomingrequest (null , false );
34+
35+ $ activator ->verify ($ request );
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments