Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache not cleared when includePaths updated #46

Open
lkysow opened this issue Jan 19, 2015 · 0 comments
Open

Cache not cleared when includePaths updated #46

lkysow opened this issue Jan 19, 2015 · 0 comments
Labels

Comments

@lkysow
Copy link

lkysow commented Jan 19, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants