public function test() { $this->assertEquals('test', $this->configField->getFieldName($this->configField->setFieldName('test'))); $this->assertEquals('string', $this->configField->getType($this->configField->setType('string'))); $this->assertEquals('Acme\\Bundle\\DemoBundle\\Entity\\TestAccount', $this->configEntity->getClassName($this->configEntity->setClassName('Acme\\Bundle\\DemoBundle\\Entity\\TestAccount'))); /** test ConfigField set/getEntity */ $this->configField->setEntity($this->configEntity); $this->assertEquals($this->configEntity, $this->configField->getEntity()); /** test ConfigField getOptions */ $this->assertInstanceOf('\\Doctrine\\Common\\Collections\\ArrayCollection', $this->configField->getOptions()); /** test ConfigEntity addField */ $this->configEntity->addField($this->configField); $this->assertEquals($this->configField, $this->configEntity->getField('test')); /** test ConfigEntity setFields */ $this->configEntity->setFields(array($this->configField)); $this->assertEquals(array($this->configField), $this->configEntity->getFields()); /** test ConfigValue */ $this->configValue->setCode('is_extend')->setScope('extend')->setValue(true)->setField($this->configField); $this->assertEquals(array('code' => 'is_extend', 'scope' => 'extend', 'value' => true, 'serializable' => false), $this->configValue->toArray()); /** test Config setValues() */ $this->configEntity->setValues(array($this->configValue)); $this->assertEquals($this->configValue, $this->configEntity->getValue('is_extend', 'extend')); }