[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: AbstractFormTest.php
File is not writable. Editing disabled.
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Tests; use Symfony\Component\Form\FormBuilder; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; abstract class AbstractFormTest extends \PHPUnit_Framework_TestCase { /** * @var EventDispatcherInterface */ protected $dispatcher; /** * @var \Symfony\Component\Form\FormFactoryInterface */ protected $factory; /** * @var \Symfony\Component\Form\FormInterface */ protected $form; protected function setUp() { // We need an actual dispatcher to use the deprecated // bindRequest() method $this->dispatcher = new EventDispatcher(); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $this->form = $this->createForm(); } protected function tearDown() { $this->dispatcher = null; $this->factory = null; $this->form = null; } /** * @return \Symfony\Component\Form\FormInterface */ abstract protected function createForm(); /** * @param string $name * @param EventDispatcherInterface $dispatcher * @param string $dataClass * @param array $options * * @return FormBuilder */ protected function getBuilder($name = 'name', EventDispatcherInterface $dispatcher = null, $dataClass = null, array $options = array()) { return new FormBuilder($name, $dataClass, $dispatcher ?: $this->dispatcher, $this->factory, $options); } /** * @param string $name * * @return \PHPUnit_Framework_MockObject_MockObject */ protected function getMockForm($name = 'name') { $form = $this->getMock('Symfony\Component\Form\Test\FormInterface'); $config = $this->getMock('Symfony\Component\Form\FormConfigInterface'); $form->expects($this->any()) ->method('getName') ->will($this->returnValue($name)); $form->expects($this->any()) ->method('getConfig') ->will($this->returnValue($config)); return $form; } /** * @return \PHPUnit_Framework_MockObject_MockObject */ protected function getDataMapper() { return $this->getMock('Symfony\Component\Form\DataMapperInterface'); } /** * @return \PHPUnit_Framework_MockObject_MockObject */ protected function getDataTransformer() { return $this->getMock('Symfony\Component\Form\DataTransformerInterface'); } /** * @return \PHPUnit_Framework_MockObject_MockObject */ protected function getFormValidator() { return $this->getMock('Symfony\Component\Form\FormValidatorInterface'); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server290.web-hosting.com
Server IP: 162.0.232.250
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux server290.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
HDD Total: 93.04 GB
HDD Free: 67.65 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: afiencwd
User ID (UID): 821
Group ID (GID): 802
Script Owner UID: 821
Current Dir Owner: N/A