/** * @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); }
/** * @covers Alchemy\Phrasea\Border\Attribute\MetaField::loadFromString */ public function testLoadFromString() { $this->assertEquals($this->object, MetaField::loadFromString(self::$DI['app'], $this->object->asString())); }