Index

Working With Files

If you need to CRUD files during a test you may use the FileSandboxTrait.

Quick Start

  1. Put the following in your test's setUp method:

      public function setUp() {
        parent::setUp();
        $this->newFileSandbox();
      }
    
  2. Use $this->sb as the scratch directory path.

  3. Call $this->newFileSandbox() at any time to empty it's contents.