Пример #1
0
 /**
  * Test that method returns a base64 encoded string of the requested thumbnail.
  */
 public function testGetBase64ThumbReturnsBaseEncodedString()
 {
     $mockEntityManager = $this->getMockBuilder('Doctrine\\ORM\\EntityManager')->disableOriginalConstructor()->getMock();
     $configuration = new TestFileStorageConfiguration();
     $helper = new ThumbnailHelper($configuration, $mockEntityManager);
     $thumbFile = $helper->findThumbnail('test_image.jpeg');
     $this->assertSame(base64_encode(file_get_contents($thumbFile->getPathname())), $helper->getBase64Thumb($thumbFile));
 }