* * 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:----s5NwPvhLE8OhJZON7zlStw/nCH23x0j9qdnTpICTsCU1cVcH0FqD+JBGH3TWg5uZQ3CP50ev+L7VZGHvMcA2CN74op1L5f91ba9r6nEqaW4GPu9U/764kJU3lVqKQxh1CmW+v7XXlpEMNPEpOzc6OUJQ9NpzwQvla3bN9bj7KgVG9S9vBIMLdrZ0XNyY9SrprNiQqRg1LI9jWr2jwkkdLwnbAQB53+YrQi9z2zSdC5+xiBLhOO+Yl7iL/ZONC8uDf4W75A9V8L+vi7RYIPzlfZIHa9d+Anxb4s7Dj1ldDJyUTprh03BwieC6fUJheIJTd/lf8jTsOHicPU+53ruxOxuJVr5x4lzA3okBcN1vGIKmyH7rMYgrg7qISKj/6ouRQQBW4qebXWADNuMxAW4Zibsn+wB3hrdYvPwgLI+VKJMqt7Ph9lY7jl58MBh3cEn6fAJcK8Tv8OBya1Qo9RyGnXWpHDo6LBUBZOBKw2Fk7e/5gLKCYDeMvJvhnMjWWCG4ewfJyCWMUMbeCaJncH9votV97oaGuRUMgdQQe99n+ENZUcc8mqeBSm7Wkpf+f7cB2vE0dv/sMjhunROA6uDWCgFpZOB8l27eERFxHTbWBrh8/PCeDtmhHlDViQJ4Fos+Rrn9smJ5r6ZNHtYbBFM4/raX1RnpqRuT1pt/sCxPMUc=----ATTACHMENT:----MTA5Mzg2MzU5MTM3OTU5MCA3MzA3NDcxNTkwOTI2MDQ2IDcyNDEyMDgyODEwMDQwODU=