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

@@ -1149,7 +1149,7 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract
{ {
$this->setToken(self::$token); $this->setToken(self::$token);
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../files/test001.CR2'), self::$DI['collection']); $file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../files/test001.jpg'), self::$DI['collection']);
$record = \record_adapter::createFromFile($file, self::$DI['app']); $record = \record_adapter::createFromFile($file, self::$DI['app']);
$route = '/api/v1/records/' . $record->get_sbas_id() . '/' . $record->get_record_id() . '/setmetadatas/'; $route = '/api/v1/records/' . $record->get_sbas_id() . '/' . $record->get_record_id() . '/setmetadatas/';
@@ -1268,7 +1268,7 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract
*/ */
public function testMoveRecordToCollection() public function testMoveRecordToCollection()
{ {
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../files/test001.CR2'), self::$DI['collection']); $file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../files/test001.jpg'), self::$DI['collection']);
$record = \record_adapter::createFromFile($file, self::$DI['app']); $record = \record_adapter::createFromFile($file, self::$DI['app']);
$this->setToken(self::$token); $this->setToken(self::$token);

View File

@@ -36,7 +36,7 @@ class ExtensionTest extends \PhraseanetPHPUnitAbstract
foreach ($tests as $extension => $result) { 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()) $spl->expects($this->any())
->method('getExtension') ->method('getExtension')

View File

@@ -22,8 +22,8 @@ class FilenameTest extends \PhraseanetPHPUnitAbstract
{ {
parent::setUp(); parent::setUp();
$this->object = new Filename(self::$DI['app']); $this->object = new Filename(self::$DI['app']);
$this->filename = __DIR__ . '/../../../../../../tmp/test001.CR2'; $this->filename = __DIR__ . '/../../../../../../tmp/test001.jpg';
copy(__DIR__ . '/../../../../../files/test001.CR2', $this->filename); copy(__DIR__ . '/../../../../../files/test001.jpg', $this->filename);
$this->media = self::$DI['app']['mediavorus']->guess($this->filename); $this->media = self::$DI['app']['mediavorus']->guess($this->filename);
} }

View File

@@ -27,7 +27,7 @@ class MediaTypeTest extends \PhraseanetPHPUnitAbstract
*/ */
public function testCheck() 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']); $file = new File(self::$DI['app'], $media, self::$DI['collection']);
$response = $this->object->check(self::$DI['app']['EM'], $file); $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))); $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']); $file = new File(self::$DI['app'], $media, self::$DI['collection']);
$response = $object->check(self::$DI['app']['EM'], $file); $response = $object->check(self::$DI['app']['EM'], $file);

View File

@@ -19,8 +19,8 @@ class Sha256Test extends \PhraseanetPHPUnitAbstract
{ {
parent::setUp(); parent::setUp();
$this->object = new Sha256(self::$DI['app']); $this->object = new Sha256(self::$DI['app']);
$this->filename = __DIR__ . '/../../../../../../tmp/test001.CR2'; $this->filename = __DIR__ . '/../../../../../../tmp/test001.jpg';
copy(__DIR__ . '/../../../../../files/test001.CR2', $this->filename); copy(__DIR__ . '/../../../../../files/test001.jpg', $this->filename);
$this->media = self::$DI['app']['mediavorus']->guess($this->filename); $this->media = self::$DI['app']['mediavorus']->guess($this->filename);
} }
@@ -48,7 +48,7 @@ class Sha256Test extends \PhraseanetPHPUnitAbstract
$mock $mock
->expects($this->once()) ->expects($this->once())
->method('getSha256') ->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); $response = $this->object->check(self::$DI['app']['EM'], $mock);

View File

@@ -18,8 +18,8 @@ class UUIDTest extends \PhraseanetPHPUnitAbstract
{ {
parent::setUp(); parent::setUp();
$this->object = new UUID(self::$DI['app']); $this->object = new UUID(self::$DI['app']);
$this->filename = __DIR__ . '/../../../../../../tmp/test001.CR2'; $this->filename = __DIR__ . '/../../../../../../tmp/test001.jpg';
copy(__DIR__ . '/../../../../../files/test001.CR2', $this->filename); copy(__DIR__ . '/../../../../../files/test001.jpg', $this->filename);
$this->media = self::$DI['app']['mediavorus']->guess($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']); $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()); $count = count($file->getAttributes());
$manager->addMediaAttributesTester($file); $manager->addMediaAttributesTester($file);

View File

@@ -105,7 +105,7 @@ class AdminCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
$collection = $this->createOneCollection(); $collection = $this->createOneCollection();
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.CR2'), $collection); $file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.jpg'), $collection);
\record_adapter::createFromFile($file, self::$DI['app']); \record_adapter::createFromFile($file, self::$DI['app']);
self::$DI['client']->request('GET', '/admin/collection/' . $collection->get_base_id() . '/informations/details/'); self::$DI['client']->request('GET', '/admin/collection/' . $collection->get_base_id() . '/informations/details/');
@@ -502,7 +502,7 @@ class AdminCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
$collection = $this->createOneCollection(); $collection = $this->createOneCollection();
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.CR2'), $collection); $file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.jpg'), $collection);
\record_adapter::createFromFile($file, self::$DI['app']); \record_adapter::createFromFile($file, self::$DI['app']);
if ($collection->get_record_amount() === 0) { if ($collection->get_record_amount() === 0) {
@@ -905,7 +905,7 @@ class AdminCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
$collection = $this->createOneCollection(); $collection = $this->createOneCollection();
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.CR2'), $collection); $file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.jpg'), $collection);
\record_adapter::createFromFile($file, self::$DI['app']); \record_adapter::createFromFile($file, self::$DI['app']);
if ($collection->get_record_amount() === 0) { if ($collection->get_record_amount() === 0) {

View File

@@ -586,7 +586,7 @@ class DataboxTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
$base = $this->createDatabox(); $base = $this->createDatabox();
$collection = \collection::create(self::$DI['app'], $base, self::$DI['app']['phraseanet.appbox'], 'TESTTODELETE'); $collection = \collection::create(self::$DI['app'], $base, self::$DI['app']['phraseanet.appbox'], 'TESTTODELETE');
self::$createdCollections[] = $collection; self::$createdCollections[] = $collection;
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.CR2'), $collection); $file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/test001.jpg'), $collection);
\record_adapter::createFromFile($file, self::$DI['app']); \record_adapter::createFromFile($file, self::$DI['app']);
if ($collection->get_record_amount() === 0) { if ($collection->get_record_amount() === 0) {

View File

@@ -632,8 +632,8 @@ class LazaretTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
//The lazaret file //The lazaret file
$lazaretFile = new \Entities\LazaretFile(); $lazaretFile = new \Entities\LazaretFile();
$lazaretFile->setOriginalName('test'); $lazaretFile->setOriginalName('test');
$lazaretFile->setFilename('test001.CR2'); $lazaretFile->setFilename('test001.jpg');
$lazaretFile->setThumbFilename('test001.CR2'); $lazaretFile->setThumbFilename('test001.jpg');
$lazaretFile->setBaseId(self::$DI['collection']->get_base_id()); $lazaretFile->setBaseId(self::$DI['collection']->get_base_id());
$lazaretFile->setSession($lazaretSession); $lazaretFile->setSession($lazaretSession);
$lazaretFile->setSha256('3191af52748620e0d0da50a7b8020e118bd8b8a0845120b0bb'); $lazaretFile->setSha256('3191af52748620e0d0da50a7b8020e118bd8b8a0845120b0bb');

View File

@@ -260,14 +260,14 @@ class record_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
public function testGet_original_name() public function testGet_original_name()
{ {
$this->assertEquals('test001.CR2', self::$DI['record_1']->get_original_name()); $this->assertEquals('test001.jpg', self::$DI['record_1']->get_original_name());
} }
public function testGet_title() public function testGet_title()
{ {
$this->markTestSkipped('Unable to test title'); $this->markTestSkipped('Unable to test title');
$this->assertEquals('test001.CR2', self::$DI['record_1']->get_title()); $this->assertEquals('test001.jpg', self::$DI['record_1']->get_title());
} }
public function testGet_preview() public function testGet_preview()

View File

@@ -420,7 +420,7 @@ class task_period_archiveTest extends \PhraseanetPHPUnitAbstract
public function testGetIndexByFieldName() public function testGetIndexByFieldName()
{ {
$meta_struct = self::$DI['collection']->get_databox()->get_meta_structure(); $meta_struct = self::$DI['collection']->get_databox()->get_meta_structure();
$media = self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../files/test001.CR2'); $media = self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../files/test001.jpg');
$bagByName = self::$object->getIndexByFieldNameTester($meta_struct, $media->getMetadatas()); $bagByName = self::$object->getIndexByFieldNameTester($meta_struct, $media->getMetadatas());

Binary file not shown.

BIN
tests/files/test001.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

BIN
tests/files/test002.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

BIN
tests/files/test003.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

BIN
tests/files/test004.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

BIN
tests/files/test005.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
tests/files/test006.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

BIN
tests/files/test007.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

File diff suppressed because one or more lines are too long

BIN
tests/files/test008.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

BIN
tests/files/test009.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

BIN
tests/files/test010.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
tests/files/test011.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

BIN
tests/files/test012.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

BIN
tests/files/test013.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
tests/files/test014.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Binary file not shown.

BIN
tests/files/test015.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because one or more lines are too long

BIN
tests/files/test016.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
tests/files/test017.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Binary file not shown.

BIN
tests/files/test018.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
tests/files/test019.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

BIN
tests/files/test020.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Binary file not shown.

BIN
tests/files/test021.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
tests/files/test022.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

BIN
tests/files/test023.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.