Exemplo n.º 1
0
 public function getParameters()
 {
     if ($this->params) {
         return $this->params;
     }
     $params = new Parameters();
     $params->setConfig($this->config);
     $params->fromString($this->url->getUrlImageName());
     return $this->params = $params;
 }
Exemplo n.º 2
0
 public function testGetUrlImageName()
 {
     $url = new Url('http://localhost/EvaThumber/thumb/d/demo,w_100.jpg');
     $url->setUrlScriptName('/EvaThumber/index.php');
     $this->assertEquals('demo,w_100.jpg', $url->getUrlImageName());
     $url = new Url('http://localhost/');
     $this->assertEquals('', $url->getUrlImageName());
     $url = new Url('http://localhost/thumb/d/foo/bar');
     $this->assertEquals('', $url->getUrlImageName());
     $url = new Url('http://localhost/thumb/d/foo/bar.');
     $this->assertEquals('', $url->getUrlImageName());
 }