<commit_before><?php

namespace sndsgd\fs;

use \org\bovigo\vfs\vfsStream;


require __DIR__."/../vendor/autoload.php";


class TestCase extends \PHPUnit_Framework_TestCase
{
   protected $root;

   protected function setUp()
   {
      $this->root = vfsStream::setup("root");
      vfsStream::create([
         "file.txt" => "contents...",
         "test" => [
            "file.txt" => "contents...",
            "emptydir" => []
         ],
         "file-no-rw" => "contents...",
         "dir-no-rw" => []
      ]);

      $this->root->getChild("file-no-rw")
         ->chmod(0700)
         ->chgrp(vfsStream::GROUP_ROOT)
         ->chown(vfsStream::OWNER_ROOT);

      $this->root->getChild("dir-no-rw")
         ->chmod(0711)
         ->chgrp(vfsStream::GROUP_ROOT)
         ->chown(vfsStream::OWNER_ROOT);
   }

   protected function getPath($path)
   {
      return vfsStream::url($path);
   }

   protected function setQuota($bytes = 0)
   {
      vfsStream::setQuota($bytes);
   }
}



class VfsStreamFailFile extends \org\bovigo\vfs\vfsStreamFile
{
   public $fail = null;

   public function getContent()
   {
      var_dump("get content");
      return ($this->fail === true) ? null : parent::getContent();
   }

   public function open()
   {
      var_dump($this->fail);
      if ($this->fail == "open") {
         var_dump('triggering error');
         trigger_error("failed to open file", E_USER_WARNING);
      }
      else {
         parent::open();   
      }
   }
}

<commit_msg>removes unused class from test bootstrap<commit_after><?php

namespace sndsgd\fs;

use \org\bovigo\vfs\vfsStream;


require __DIR__."/../vendor/autoload.php";


class TestCase extends \PHPUnit_Framework_TestCase
{
   protected $root;

   protected function setUp()
   {
      $this->root = vfsStream::setup("root");
      vfsStream::create([
         "file.txt" => "contents...",
         "test" => [
            "file.txt" => "contents...",
            "emptydir" => []
         ],
         "file-no-rw" => "contents...",
         "dir-no-rw" => []
      ]);

      $this->root->getChild("file-no-rw")
         ->chmod(0700)
         ->chgrp(vfsStream::GROUP_ROOT)
         ->chown(vfsStream::OWNER_ROOT);

      $this->root->getChild("dir-no-rw")
         ->chmod(0711)
         ->chgrp(vfsStream::GROUP_ROOT)
         ->chown(vfsStream::OWNER_ROOT);
   }

   protected function getPath($path)
   {
      return vfsStream::url($path);
   }

   protected function setQuota($bytes = 0)
   {
      vfsStream::setQuota($bytes);
   }
}


{'fraction_non_alphanumeric': 0.1727810650887574, 'fraction_numerical': 0.007100591715976331, 'mean_word_length': 2.197982345523329, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1262661', 'n_tokens_mistral': 887, 'n_tokens_neox': 858, 'n_words': 130}