public function testCreatingTempDirectoryDestroysPreviousOne()
 {
     $firstPath = \PhpunitTempDir\Helper::createTempDir();
     $this->assertEquals('vfs://root/', $firstPath);
     mkdir($firstPath . 'loremipsum');
     $this->assertFileExists($firstPath . 'loremipsum');
     $customPath = \PhpunitTempDir\Helper::createTempDir();
     $this->assertEquals('vfs://root/', $customPath);
     $this->assertFileExists($customPath);
     $this->assertFileNotExists($firstPath . 'loremipsum');
 }
Exemple #2
0
 public static function setUpBeforeClass()
 {
     static::$path = \PhpunitTempDir\Helper::createTempDir();
 }