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()); }
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()); }
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()); }