Ejemplo n.º 1
0
 public function testSetGetBaseFile()
 {
     $this->mediaDirectory->expects($this->any())->method('isFile')->will($this->returnValue(true));
     $this->mediaDirectory->expects($this->any())->method('isExist')->will($this->returnValue(true));
     $absolutePath = dirname(dirname(__DIR__)) . '/_files/catalog/product/somefile.png';
     $this->mediaDirectory->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($absolutePath));
     $this->image->setBaseFile('/somefile.png');
     $this->assertEquals('catalog/product/somefile.png', $this->image->getBaseFile());
     $this->assertEquals('catalog/product/cache/1//9df78eab33525d08d6e5fb8d27136e95/somefile.png', $this->image->getNewFile());
 }
Ejemplo n.º 2
0
 public function testSetGetBaseFile()
 {
     $this->mediaDirectory->expects($this->any())->method('isFile')->will($this->returnValue(true));
     $this->mediaDirectory->expects($this->any())->method('isExist')->will($this->returnValue(true));
     $absolutePath = dirname(dirname(__DIR__)) . '/_files/catalog/product/somefile.png';
     $this->mediaDirectory->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($absolutePath));
     $this->image->setBaseFile('/somefile.png');
     $this->assertEquals('catalog/product/somefile.png', $this->image->getBaseFile());
     $this->assertEquals('catalog/product/cache/1//beff4985b56e3afdbeabfc89641a4582/somefile.png', $this->image->getNewFile());
 }
Ejemplo n.º 3
0
 public function testSetGetBaseFile()
 {
     $this->mediaDirectory->expects($this->any())->method('isFile')->will($this->returnValue(true));
     $this->mediaDirectory->expects($this->any())->method('isExist')->will($this->returnValue(true));
     $absolutePath = dirname(dirname(__DIR__)) . '/_files/catalog/product/somefile.png';
     $this->mediaDirectory->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($absolutePath));
     $this->image->setBaseFile('/somefile.png');
     $this->assertEquals('catalog/product/somefile.png', $this->image->getBaseFile());
     $this->assertEquals('catalog/product/cache/1//a4e40ebdc3e371adff845072e1c73f37/somefile.png', $this->image->getNewFile());
 }