Bolt\Tests\Stack\StackTest::setUp PHP Метод

setUp() защищенный Метод

protected setUp ( )
    protected function setUp()
    {
        $app = $this->getApp();
        $this->users = $this->getMockUsers(['getCurrentUser', 'saveUser']);
        $this->session = new Session(new MockArraySessionStorage());
        $this->filesystem = new Filesystem\Manager(['files' => new Filesystem\Filesystem(new MemoryAdapter()), 'theme' => new Filesystem\Filesystem(new MemoryAdapter())]);
        $matcher = new Filesystem\Matcher($this->filesystem, ['files', 'themes', 'theme']);
        $this->stack = new Stack($matcher, $this->users, $this->session, $this->acceptedFileTypes);
        $this->session->set('stack', ['a.jpg', 'b.txt', 'files://c.txt', 'd.doc', 'e.mp3', 'theme://f.txt', 'g.txt', 'does_not_exist.txt', 'h.txt']);
        $this->createFiles(['files://a.jpg', 'files://b.txt', 'files://c.txt', 'files://d.doc', 'files://e.mp3', 'theme://f.txt', 'theme://g.txt', 'files://h.txt', 'files://evil.exe']);
    }