PhpBench\Tests\System\SystemTestCase::setUp PHP Метод

setUp() публичный Метод

public setUp ( )
    public function setUp()
    {
        $this->filesystem = new Filesystem();
        $this->workspaceDir = sys_get_temp_dir() . '/phpbench-tests';
        $this->filesystem->remove($this->workspaceDir);
        $this->filesystem->mkdir($this->workspaceDir);
        $this->fname = sprintf('%s/%s', $this->workspaceDir, 'testfile');
        $this->filesystem->mirror(__DIR__ . '/env', $this->workspaceDir . '/env');
        $this->filesystem->mirror(__DIR__ . '/benchmarks', $this->workspaceDir . '/benchmarks');
        $this->filesystem->mirror(__DIR__ . '/bootstrap', $this->workspaceDir . '/bootstrap');
    }

Usage Example

Пример #1
0
 public function setUp()
 {
     if (!extension_loaded('xdebug')) {
         $this->markTestSkipped('XDebug not enabled.');
     }
     parent::setUp();
 }