[Form] Fix legacy tests that break master
This commit is contained in:
parent
4eaa4bffd2
commit
9cdda3f8ba
@ -28,17 +28,6 @@ class AbstractExtensionTest extends \PHPUnit_Framework_TestCase
|
||||
$loader = new ConcreteExtension();
|
||||
$this->assertInstanceOf('Symfony\Component\Form\Tests\Fixtures\FooType', $loader->getType('foo'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage Custom resolver "Symfony\Component\Form\Tests\Fixtures\CustomOptionsResolver" must extend "Symfony\Component\OptionsResolver\OptionsResolver".
|
||||
*/
|
||||
public function testCustomOptionsResolver()
|
||||
{
|
||||
$extension = new Fixtures\FooTypeBarExtension();
|
||||
$resolver = new Fixtures\CustomOptionsResolver();
|
||||
$extension->setDefaultOptions($resolver);
|
||||
}
|
||||
}
|
||||
|
||||
class ConcreteExtension extends AbstractExtension
|
||||
|
@ -1,65 +0,0 @@
|
||||
<?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\Fixtures;
|
||||
|
||||
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||
|
||||
class CustomOptionsResolver implements OptionsResolverInterface
|
||||
{
|
||||
public function setDefaults(array $defaultValues)
|
||||
{
|
||||
}
|
||||
|
||||
public function replaceDefaults(array $defaultValues)
|
||||
{
|
||||
}
|
||||
|
||||
public function setOptional(array $optionNames)
|
||||
{
|
||||
}
|
||||
|
||||
public function setRequired($optionNames)
|
||||
{
|
||||
}
|
||||
|
||||
public function setAllowedValues($allowedValues)
|
||||
{
|
||||
}
|
||||
|
||||
public function addAllowedValues($allowedValues)
|
||||
{
|
||||
}
|
||||
|
||||
public function setAllowedTypes($allowedTypes)
|
||||
{
|
||||
}
|
||||
|
||||
public function addAllowedTypes($allowedTypes)
|
||||
{
|
||||
}
|
||||
|
||||
public function setNormalizers(array $normalizers)
|
||||
{
|
||||
}
|
||||
|
||||
public function isKnown($option)
|
||||
{
|
||||
}
|
||||
|
||||
public function isRequired($option)
|
||||
{
|
||||
}
|
||||
|
||||
public function resolve(array $options = array())
|
||||
{
|
||||
}
|
||||
}
|
@ -1052,17 +1052,6 @@ class SimpleFormTest extends AbstractFormTest
|
||||
$child->initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage Custom resolver "Symfony\Component\Form\Tests\Fixtures\CustomOptionsResolver" must extend "Symfony\Component\OptionsResolver\OptionsResolver".
|
||||
*/
|
||||
public function testCustomOptionsResolver()
|
||||
{
|
||||
$fooType = new Fixtures\FooType();
|
||||
$resolver = new Fixtures\CustomOptionsResolver();
|
||||
$fooType->setDefaultOptions($resolver);
|
||||
}
|
||||
|
||||
protected function createForm()
|
||||
{
|
||||
return $this->getBuilder()->getForm();
|
||||
|
Reference in New Issue
Block a user