public function testGetOwnedFieldBundleElements() { $xml = simplexml_load_file($this->filename); $bundle = new EnumBundle($xml); /** @var EnumField[] $bundleElements */ $bundleElements = $bundle->getValues(); $this->assertCount(3, $bundleElements); $this->assertSame('V1', $bundleElements[0]->getName()); $this->assertSame('V1', (string) $bundleElements[0]); }
/** * @param EnumBundle $bundle * @return \SimpleXMLElement */ public function createEnumBundle(EnumBundle $bundle) { return $this->requestXml('PUT', '/admin/customfield/bundle', $bundle->toXML(), 400); }