Replace old files with new ones

This commit is contained in:
Romain Neutron
2013-06-28 17:50:01 +02:00
parent 94d7a12d1d
commit 2307a0b038
59 changed files with 22 additions and 14614 deletions

View File

@@ -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')

View File

@@ -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);
}

View File

@@ -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);

View 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);

View File

@@ -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);
}

View File

@@ -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);