public function register(DiInterface $di) { $config = $di->get('config'); $di->set(self::SERVICE_NAME, function () use($config) { $uploaderAdapter = new Uploader(new \Foo\Models\Fake()); $uploaderAdapter->setExtensions(['jpg', 'png']); $uploaderAdapter->setMimeTypes(['image/jpeg', 'image/png']); $uploaderAdapter->setMaxFileSize('10MB'); $uploaderAdapter->setTempDestination(\Vegas\Utils\Path::getRootPath() . '/public/temp'); $uploaderAdapter->setOriginalDestination(\Vegas\Utils\Path::getRootPath() . '/public/uploads'); return $uploaderAdapter; }, true); }
public function testRootPath() { $this->assertEquals('/', Path::getRelativePath(Path::getRootPath())); }