예제 #1
0
 public function testGetPath()
 {
     $image = new Image();
     $image->setFilename('photo.jpg');
     $this->assertSame('photo.jpg', $image->getFilename());
     $appPath = realpath('.');
     $expected = $appPath . '/htdocs/data/images/photo.jpg';
     $this->assertSame($expected, $image->getPath());
     $expected = $appPath . '/htdocs/data/images/small/photo.jpg';
     $this->assertSame($expected, $image->getSmallPath());
 }