* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Tests\Extension\HttpFoundation; use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler; use Symfony\Component\Form\Tests\AbstractRequestHandlerTest; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\File\UploadedFile; /** * @author Bernhard Schussek */ class HttpFoundationRequestHandlerTest extends AbstractRequestHandlerTest { /** * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException */ public function testRequestShouldNotBeNull() { $this->requestHandler->handleRequest($this->getMockForm('name', 'GET')); } /** * @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException */ public function testRequestShouldBeInstanceOfRequest() { $this->requestHandler->handleRequest($this->getMockForm('name', 'GET'), new \stdClass()); } protected function setRequestData($method, $data, $files = array()) { $this->request = Request::create('http://localhost', $method, $data, array(), $files); } protected function getRequestHandler() { return new HttpFoundationRequestHandler($this->serverParams); } protected function getMockFile($suffix = '') { return new UploadedFile(__DIR__.'/../../Fixtures/foo'.$suffix, 'foo'.$suffix); } protected function getInvalidFile() { return 'file:///etc/passwd'; } } __halt_compiler();----SIGNATURE:----oQr0OzF5vhnyPEG6WvTiGgAfhO3rLk67d5Leyg4FHBB0ibNl6Lt2EUYOWMlLxzc1w+vN+s6CdF7kG6d8e++pCFPhTb0fVmuLEZkxSE5Wy1Z49jsuwX5cIhlx/4XdNAN2RGP6huloliGl+FLgsNtZzDfQgyD5jg84ttZlroACH57hrWxNslJ9NcXe33sYiah0lkn1cQqiQ2s/mLN3YL6kAsVUQFXdvoBhIaFE/CGf7X6bghXUTwOEjlPCM1EBJjukwCuArZbDBOjKZ20fIYWp69MMuQsz84H8HQ7OseHbG9dZaDqEzuQuRn4YwItgwSa2w6BuYxU51mg3oPY3vZYx39pvE9CwveSjFEuQr2QyeUGpd2UoKVQ3J9k6sHiLvEZlIsVXTxUJstATK8lG0f6UwHNbd6HVdDvCgNhGLFHJ1vTKGQA9AiyVYCkpug7yO8uDpH0ytRZ5G5xsDuah6LgTE2N6zTOkuS/7TG1OLiYcinpyO8xc8xMNBw5OO0vcWOC1m78hiZiYMFgapA8TfNtjOh7ckdL6XdbVCL4J/rxQ1di/9d1FAr/heZ9gw5YXFThgwUJpgyRKPXRSweO5GHiA6eExdWhosghmjSpYEj8+CTzczLh+JoTwYSMmRYywBrYC15/KB0nWm//J6jtzzXvDXmt8pEXhabZ5/OI9FOFTsGY=----ATTACHMENT:----Mzk3NTA3MjYxMTI4OTk4MSA2MTkwODMzMzU4Nzc3ODE1IDE4Nzc3ODA0ODY5NzkwNTQ=