public function testThumbnail()
 {
     $provider = $this->getProvider();
     $media = new Media();
     $media->setName('test.png');
     $media->setId(1023456);
     $provider->generateThumbnails($media);
 }
 public function testThumbnail()
 {
     $provider = $this->getProvider();
     $media = new Media();
     $media->setName('test.png');
     $media->setProviderReference('ASDASDAS.png');
     $media->setId(1023456);
     $this->assertTrue($provider->requireThumbnails($media));
     $provider->addFormat('big', array('width' => 200, 'height' => 100, 'constraint' => true));
     $this->assertNotEmpty($provider->getFormats(), '::getFormats() return an array');
     $provider->generateThumbnails($media);
     $this->assertEquals('default/0011/24/thumb_1023456_big.jpg', $provider->generatePrivateUrl($media, 'big'));
 }
 public function testHelperProperies()
 {
     $provider = $this->getProvider();
     $provider->addFormat('admin', array('width' => 100));
     $media = new Media();
     $media->setName('Les tests');
     $media->setProviderReference('ASDASDAS.png');
     $media->setId(10);
     $media->setHeight(100);
     $media->setWidth(100);
     $properties = $provider->getHelperProperties($media, 'admin');
     $this->assertInternalType('array', $properties);
     $this->assertEquals(100, $properties['height']);
     $this->assertEquals(100, $properties['width']);
 }