コード例 #1
0
ファイル: FileElementSpec.php プロジェクト: desmart/deform
 function it_should_return_element_value_from_request(NodeInterface $node, RequestInterface $request)
 {
     $node->getAttribute('name')->willReturn('foo')->shouldBeCalled();
     $request->file('foo')->willReturn('bar')->shouldBeCalled();
     $this->getValue()->shouldBe('bar');
 }
コード例 #2
0
ファイル: FileElement.php プロジェクト: desmart/deform
 /**
  * Get the value of a form element.
  *
  * @return mixed
  */
 public function getValue()
 {
     return $this->request->file($this->getName());
 }