Commit 08f37a7
committed
test(cache): completar cobertura de FileCacheStrategy
- Adicionados 2 testes em FileCacheStrategyTest.php:
* testConstructorThrowsWhenDirectoryCannotBeCreated — L28: mkdir falha
dentro de um arquivo (não-diretório) → DiscoveryException::cacheCorruption
* testClearReturnsSilentlyWhenDirectoryUnreadable — L94: glob() retorna
false com dir sem leitura → clear() retorna sem throw
- Suprimidos PHP Warnings com @ operator:
* @mkdir() no construtor (L27): E_WARNING antes de retornar false
* O false já é tratado — o warning é ruído
Methods: 71.43% → 85.71% (6/7) | Lines: 93.94% → 96.97% (32/33)
L94 coberta apenas em ambientes não-root (markTestSkipped se root)
keyToPath() = método privado não rastreável individualmente pelo PCOV
Tests: 222, Assertions: 440 ✓1 parent d030090 commit 08f37a7
2 files changed
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
169 | 208 | | |
170 | 209 | | |
171 | 210 | | |
| |||
0 commit comments