Codeception / Codeception/AspectMock

Cache not cleared when includePaths updated

Ouverte
#46 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
PHP
Étoiles
784
Forks
132
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## Bug

When you add a file to be mocked to the `includePaths` config the cache isn't updated and you can't mock that class until you manually delete the cache.
## Reproduction
- set up your includePaths to not include file `A.php`
- run a test using AspectMock that utilizes `A.php` so it's pulled into the cache
- now add `A.php` to your `includePaths` config
- modify your test so you mock something inside `A.php`
- re-run your test. `A.php` won't be mocked because the cache doesn't get refreshed
## Resolution

A copy of `includePaths` should be included in the cache. When checking if a file should be read from cache or re-processed, we should also check if that file has been added to `includePaths` since the cache was last written

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.