Disable file operation for testing purposes

I’m writing tests for my plugin that manipulate site/page content in a multilang setup, creating files. Can I stop Kirby from creating files when the content is updated via the API when using $page->update() for example? What I want is:

  1. Start with a fresh Site
  2. Update site/pages
  3. Perform tests on the resulting $site and its children

When I run the tests again, I don’t want old data to mess up with them, which happens if Kirby saves to and reads from files.