public function setUp() { $target = __DIR__ . '/../../../tmp/TestContentArchive'; $configuration = new ContentArchiveConfiguration(); $configuration->setContentArchiveFolder($target); $connection = $configuration->createReadWriteConnection(); $this->connection = $connection; }
public function setUp() { $target = __DIR__ . '/../../../tmp/ExampleContentArchive'; $configuration = new ContentArchiveConfiguration(); $configuration->setContentArchiveFolder($target); $connection = $configuration->createReadWriteConnection(); $this->connection = $connection; KVMLoggerFactory::createWithKLogger(__DIR__ . '/../../../tmp'); }
public function setUp() { $target = __DIR__ . '/../../../tmp/ExampleContentArchive'; $configuration = new ContentArchiveConfiguration(); $configuration->setContentArchiveFolder($target); $connection = $configuration->createReadWriteConnection(); $this->connection = $connection; $this->repository = new Repository('phpunit', $this->connection); }
public function createContentArchiveRepository($name, $folder, $options = ['files' => true], $cache = true) { $this->options = $options; $folder = rtrim($folder, '/'); $configuration = new ContentArchiveConfiguration(); $configuration->setContentArchiveFolder($folder); $connection = $configuration->createReadWriteConnection(); $fileManager = null; if ($this->getOption('files', true) == true) { $fileManager = new DirectoryBasedFilesAccess($folder . '/files'); } $repository = $this->createRepository($name, $connection, $fileManager, $this->getOption('title', null), $cache); return $repository; }