/**
  * @test
  */
 public function getValueReturnsValueIfAttributeIsSet()
 {
     $attributeProphecy = $this->prophesize('TYPO3\\CMS\\Form\\Domain\\Model\\Attribute\\AbstractAttribute');
     $attributeProphecy->getValue()->shouldBeCalled()->willReturn('aValue');
     $this->subject->setAttribute('anAttribute', $attributeProphecy->reveal());
     $this->assertSame('aValue', $this->subject->getValue('anAttribute'));
 }
Esempio n. 2
0
 /**
  * Get the value of a specific attribute by key
  *
  * @param string $key Name of the attribute
  * @return mixed
  */
 public function getAttributeValue($key)
 {
     return $this->attributes->getValue($key);
 }