mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Fix build
This commit is contained in:
@@ -628,7 +628,7 @@ class API_V1_test_adapter extends PhraseanetWebTestCaseAbstract
|
||||
$record = $databox->get_record($record_id);
|
||||
$caption = $record->get_caption();
|
||||
|
||||
$this->assertEquals(count($caption->get_fields()), count($content->response->metadatas));
|
||||
$this->assertEquals(count($caption->get_fields()), count(get_object_vars($content->response->metadatas)), 'Retrived metadatas are the same');
|
||||
|
||||
foreach ($caption->get_fields() as $field)
|
||||
{
|
||||
@@ -661,6 +661,9 @@ class API_V1_test_adapter extends PhraseanetWebTestCaseAbstract
|
||||
$collection = array_shift($databox->get_collections());
|
||||
$system_file = new system_file(dirname(__FILE__) . '/../../testfiles/cestlafete.jpg');
|
||||
|
||||
if(!$collection instanceof \collection)
|
||||
$this->fail('unable to find a collection');
|
||||
|
||||
$record = record_adapter::create($collection, $system_file);
|
||||
|
||||
$record_id = $record->get_record_id();
|
||||
@@ -725,6 +728,9 @@ class API_V1_test_adapter extends PhraseanetWebTestCaseAbstract
|
||||
$collection = array_shift($databox->get_collections());
|
||||
$system_file = new system_file(dirname(__FILE__) . '/../../testfiles/cestlafete.jpg');
|
||||
|
||||
if(!$collection instanceof \collection)
|
||||
$this->fail('unable to find a collection');
|
||||
|
||||
$record = record_adapter::create($collection, $system_file);
|
||||
|
||||
$record_id = $record->get_record_id();
|
||||
@@ -1194,7 +1200,7 @@ class API_V1_test_adapter extends PhraseanetWebTestCaseAbstract
|
||||
$this->assertObjectHasAttribute("metadatas", $content->response);
|
||||
foreach ($content->response->metadatas as $meta)
|
||||
{
|
||||
$this->assertTrue(is_object($meta->metadatas), 'Un bloc meta est un objet');
|
||||
$this->assertTrue(is_object($meta), 'Un bloc meta est un objet');
|
||||
$this->assertObjectHasAttribute('meta_id', $meta);
|
||||
$this->assertTrue(is_int($meta->meta_id));
|
||||
$this->assertObjectHasAttribute('meta_structure_id', $meta);
|
||||
|
Reference in New Issue
Block a user