/** * Test getRoots * * @return void */ public function testGetRoots() { $conf = new Viewer\Conf($this->_path); $roots = $conf->getRoots(); //default configured roots does not exists $this->array($roots)->isEmpty(); //set roots to really check $conf->setRoots($this->_roots); $roots = $conf->getRoots(); $this->array($roots)->hasSize(1)->strictlyContains(TESTS_DIR . '/data/images/'); }
/** * Test image transformation with unexistant prepared images path * * @return void */ public function testMissingPreparedPath() { $config_path = APP_DIR . '/../tests/config/config-woprepared.yml'; $conf = new Viewer\Conf($config_path); $conf->setRoots($this->_roots); $picture = new Viewer\Picture($conf, 'doms.jpg', null); $display = $picture->getDisplay('thumb'); $length = $display['headers']['Content-Length']; //thumb does not exists, size is full image size $this->integer($length)->isIdenticalTo(20157); }