Commit a6e7666
authored
Add Laravel-style fake()/unfake() to Auth, Cache, Vault, Log facades
following the Http.fake() pattern from #18. Each fake replaces the
IoC-bound service with an in-memory test double that records operations
and supports assertion methods — no mockito needed.
- FakeAuthManager with internal FakeGuard (login/logout/check/user)
- FakeCacheManager with in-memory CacheStore (get/put/has/forget/flush)
- FakeVaultService with in-memory secure storage (no FlutterSecureStorage)
- FakeLogManager with silent log capture (all RFC 5424 levels)
- Auth facade refactored from direct singleton to IoC resolution
- AuthManager.forTesting() + MagicVaultService.forTesting() constructors
- 130 new tests, 649 total passing
1 parent 905a5a8 commit a6e7666
21 files changed
Lines changed: 2689 additions & 2 deletions
File tree
- doc/testing
- lib
- src
- auth
- facades
- security
- testing
- skills/magic-framework/references
- test/testing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments