mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Replace old files with new ones
This commit is contained in:
@@ -36,7 +36,7 @@ class ExtensionTest extends \PhraseanetPHPUnitAbstract
|
||||
|
||||
foreach ($tests as $extension => $result) {
|
||||
|
||||
$spl = $this->getMock('\\Symfony\\Component\\HttpFoundation\\File\\File', array('getExtension'), array(__DIR__ . '/../../../../../files/test001.CR2'));
|
||||
$spl = $this->getMock('\\Symfony\\Component\\HttpFoundation\\File\\File', array('getExtension'), array(__DIR__ . '/../../../../../files/test001.jpg'));
|
||||
|
||||
$spl->expects($this->any())
|
||||
->method('getExtension')
|
||||
|
@@ -22,8 +22,8 @@ class FilenameTest extends \PhraseanetPHPUnitAbstract
|
||||
{
|
||||
parent::setUp();
|
||||
$this->object = new Filename(self::$DI['app']);
|
||||
$this->filename = __DIR__ . '/../../../../../../tmp/test001.CR2';
|
||||
copy(__DIR__ . '/../../../../../files/test001.CR2', $this->filename);
|
||||
$this->filename = __DIR__ . '/../../../../../../tmp/test001.jpg';
|
||||
copy(__DIR__ . '/../../../../../files/test001.jpg', $this->filename);
|
||||
$this->media = self::$DI['app']['mediavorus']->guess($this->filename);
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ class MediaTypeTest extends \PhraseanetPHPUnitAbstract
|
||||
*/
|
||||
public function testCheck()
|
||||
{
|
||||
$media = self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.CR2');
|
||||
$media = self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.jpg');
|
||||
$file = new File(self::$DI['app'], $media, self::$DI['collection']);
|
||||
$response = $this->object->check(self::$DI['app']['EM'], $file);
|
||||
|
||||
@@ -35,7 +35,7 @@ class MediaTypeTest extends \PhraseanetPHPUnitAbstract
|
||||
|
||||
$object = new MediaType(self::$DI['app'], array('mediatypes' => array(MediaType::TYPE_VIDEO, MediaType::TYPE_AUDIO)));
|
||||
|
||||
$media = self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.CR2');
|
||||
$media = self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.jpg');
|
||||
$file = new File(self::$DI['app'], $media, self::$DI['collection']);
|
||||
$response = $object->check(self::$DI['app']['EM'], $file);
|
||||
|
||||
|
@@ -19,8 +19,8 @@ class Sha256Test extends \PhraseanetPHPUnitAbstract
|
||||
{
|
||||
parent::setUp();
|
||||
$this->object = new Sha256(self::$DI['app']);
|
||||
$this->filename = __DIR__ . '/../../../../../../tmp/test001.CR2';
|
||||
copy(__DIR__ . '/../../../../../files/test001.CR2', $this->filename);
|
||||
$this->filename = __DIR__ . '/../../../../../../tmp/test001.jpg';
|
||||
copy(__DIR__ . '/../../../../../files/test001.jpg', $this->filename);
|
||||
$this->media = self::$DI['app']['mediavorus']->guess($this->filename);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class Sha256Test extends \PhraseanetPHPUnitAbstract
|
||||
$mock
|
||||
->expects($this->once())
|
||||
->method('getSha256')
|
||||
->will($this->returnValue($this->media->getHash('sha256', __DIR__ . '/../../../../../files/test001.CR2')))
|
||||
->will($this->returnValue($this->media->getHash('sha256', __DIR__ . '/../../../../../files/test001.jpg')))
|
||||
;
|
||||
|
||||
$response = $this->object->check(self::$DI['app']['EM'], $mock);
|
||||
|
@@ -18,8 +18,8 @@ class UUIDTest extends \PhraseanetPHPUnitAbstract
|
||||
{
|
||||
parent::setUp();
|
||||
$this->object = new UUID(self::$DI['app']);
|
||||
$this->filename = __DIR__ . '/../../../../../../tmp/test001.CR2';
|
||||
copy(__DIR__ . '/../../../../../files/test001.CR2', $this->filename);
|
||||
$this->filename = __DIR__ . '/../../../../../../tmp/test001.jpg';
|
||||
copy(__DIR__ . '/../../../../../files/test001.jpg', $this->filename);
|
||||
$this->media = self::$DI['app']['mediavorus']->guess($this->filename);
|
||||
}
|
||||
|
||||
|
@@ -459,7 +459,7 @@ class ManagerTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
{
|
||||
$manager = new ManagerTester(self::$DI['app']);
|
||||
|
||||
$file = File::buildFromPathfile(__DIR__ . '/../../../../files/test012.wav', self::$DI['collection'], self::$DI['app']);
|
||||
$file = File::buildFromPathfile(__DIR__ . '/../../../../files/audio.wav', self::$DI['collection'], self::$DI['app']);
|
||||
|
||||
$count = count($file->getAttributes());
|
||||
$manager->addMediaAttributesTester($file);
|
||||
|
Reference in New Issue
Block a user