コード例 #1
0
ファイル: FactoryTest.php プロジェクト: luisbrito/Phraseanet
 /**
  * @covers Alchemy\Phrasea\Border\Attribute\Factory::getFileAttribute
  */
 public function testGetFileAttributeMetaField()
 {
     $databox_field = null;
     foreach (self::$DI['collection']->get_databox()->get_meta_structure() as $df) {
         $databox_field = $df;
         break;
     }
     if (!$databox_field) {
         $this->markTestSkipped('No databox field found');
     }
     $metafield = new MetaField($databox_field, ['value']);
     $attribute = Factory::getFileAttribute(self::$DI['app'], AttributeInterface::NAME_METAFIELD, $metafield->asString());
     $this->assertInstanceOf('\\Alchemy\\Phrasea\\Border\\Attribute\\MetaField', $attribute);
 }
コード例 #2
0
ファイル: MetaFieldTest.php プロジェクト: nlegoff/Phraseanet
 /**
  * @covers Alchemy\Phrasea\Border\Attribute\MetaField::loadFromString
  */
 public function testLoadFromString()
 {
     $this->assertEquals($this->object, MetaField::loadFromString(self::$DI['app'], $this->object->asString()));
 }