Exemple #1
0
 /**
  * @dataProvider getUpdateFocusProvider
  */
 public function testUpdateFocus($direction, $fromLeft, $fromTop, $toLeft, $toTop)
 {
     $media = new Media();
     $media->setFocusLeft($fromLeft)->setFocusTop($fromTop);
     $this->testClass->setDirection($direction)->updateFocus($media);
     $this->assertEquals($media->getFocusLeft(), $toLeft);
     $this->assertEquals($media->getFocusTop(), $toTop);
 }
 /**
  * @dataProvider getCreateReferenceProvider
  */
 public function testCreateReference($extension, $savedExtension)
 {
     $media = new Media();
     $media->setExtension($extension);
     $mm = $this->testClass;
     $mm->createReference($media);
     $this->assertRegExp('#^[a-z0-9]+\\.' . str_replace('.', '\\.', $savedExtension) . '$#', $media->getReference());
 }