Repository navigation
Commit 3f23901
committed
fix: when injecting Config mock with
When you call `Factories::injectMock('config', 'Validation', $config)`,
but if the production code calls `config(\Config\Validation::class)`,
the mock instance will not be used and fail the test:
CodeIgniter\Database\ModelFactoryTest::testBasenameReturnsExistingNamespaceInstanceValidation, register the same instance as Config\Validation
1 parent 8629fdd commit 3f23901
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
405 | 409 | | |
406 | 410 | | |
407 | 411 | | |
| |||
0 commit comments