Replace old files with new ones
@@ -1149,7 +1149,7 @@ abstract class ApiAbstract extends \PhraseanetWebTestCaseAbstract
|
||||
{
|
||||
$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']);
|
||||
|
||||
$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()
|
||||
{
|
||||
$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']);
|
||||
|
||||
$this->setToken(self::$token);
|
||||
|
@@ -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);
|
||||
|
@@ -105,7 +105,7 @@ class AdminCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
|
||||
$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']);
|
||||
|
||||
self::$DI['client']->request('GET', '/admin/collection/' . $collection->get_base_id() . '/informations/details/');
|
||||
@@ -502,7 +502,7 @@ class AdminCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
|
||||
$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']);
|
||||
|
||||
if ($collection->get_record_amount() === 0) {
|
||||
@@ -905,7 +905,7 @@ class AdminCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
|
||||
$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']);
|
||||
|
||||
if ($collection->get_record_amount() === 0) {
|
||||
|
@@ -586,7 +586,7 @@ class DataboxTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
$base = $this->createDatabox();
|
||||
$collection = \collection::create(self::$DI['app'], $base, self::$DI['app']['phraseanet.appbox'], 'TESTTODELETE');
|
||||
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']);
|
||||
|
||||
if ($collection->get_record_amount() === 0) {
|
||||
|
@@ -632,8 +632,8 @@ class LazaretTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
//The lazaret file
|
||||
$lazaretFile = new \Entities\LazaretFile();
|
||||
$lazaretFile->setOriginalName('test');
|
||||
$lazaretFile->setFilename('test001.CR2');
|
||||
$lazaretFile->setThumbFilename('test001.CR2');
|
||||
$lazaretFile->setFilename('test001.jpg');
|
||||
$lazaretFile->setThumbFilename('test001.jpg');
|
||||
$lazaretFile->setBaseId(self::$DI['collection']->get_base_id());
|
||||
$lazaretFile->setSession($lazaretSession);
|
||||
$lazaretFile->setSha256('3191af52748620e0d0da50a7b8020e118bd8b8a0845120b0bb');
|
||||
|
@@ -260,14 +260,14 @@ class record_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
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()
|
||||
{
|
||||
$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()
|
||||
|
@@ -420,7 +420,7 @@ class task_period_archiveTest extends \PhraseanetPHPUnitAbstract
|
||||
public function testGetIndexByFieldName()
|
||||
{
|
||||
$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());
|
||||
|
||||
|
BIN
tests/files/test001.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test002.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test003.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test004.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test005.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test006.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test007.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test008.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test009.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test010.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test011.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test012.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test013.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test014.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test015.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test016.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test017.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test018.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test019.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test020.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test021.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test022.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
tests/files/test023.jpg
Normal file
After Width: | Height: | Size: 30 KiB |