From 46b77928f746a4231d064774b5b67fd892c7ce86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 4 Aug 2013 17:50:34 +0200 Subject: rm vendor --- .../Core/ChoiceList/LazyChoiceListTest.php | 116 --------------------- 1 file changed, 116 deletions(-) delete mode 100644 vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/LazyChoiceListTest.php (limited to 'vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/LazyChoiceListTest.php') diff --git a/vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/LazyChoiceListTest.php b/vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/LazyChoiceListTest.php deleted file mode 100644 index bcd309e0..00000000 --- a/vendor/symfony/form/Symfony/Component/Form/Tests/Extension/Core/ChoiceList/LazyChoiceListTest.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * 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\Core\ChoiceList; - -use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList; -use Symfony\Component\Form\Extension\Core\ChoiceList\LazyChoiceList; -use Symfony\Component\Form\Extension\Core\View\ChoiceView; - -class LazyChoiceListTest extends \PHPUnit_Framework_TestCase -{ - private $list; - - protected function setUp() - { - parent::setUp(); - - $this->list = new LazyChoiceListTest_Impl(new SimpleChoiceList(array( - 'a' => 'A', - 'b' => 'B', - 'c' => 'C', - ), array('b'))); - } - - protected function tearDown() - { - parent::tearDown(); - - $this->list = null; - } - - public function testGetChoices() - { - $this->assertSame(array(0 => 'a', 1 => 'b', 2 => 'c'), $this->list->getChoices()); - } - - public function testGetValues() - { - $this->assertSame(array(0 => 'a', 1 => 'b', 2 => 'c'), $this->list->getValues()); - } - - public function testGetPreferredViews() - { - $this->assertEquals(array(1 => new ChoiceView('b', 'b', 'B')), $this->list->getPreferredViews()); - } - - public function testGetRemainingViews() - { - $this->assertEquals(array(0 => new ChoiceView('a', 'a', 'A'), 2 => new ChoiceView('c', 'c', 'C')), $this->list->getRemainingViews()); - } - - public function testGetIndicesForChoices() - { - $choices = array('b', 'c'); - $this->assertSame(array(1, 2), $this->list->getIndicesForChoices($choices)); - } - - public function testGetIndicesForValues() - { - $values = array('b', 'c'); - $this->assertSame(array(1, 2), $this->list->getIndicesForValues($values)); - } - - public function testGetChoicesForValues() - { - $values = array('b', 'c'); - $this->assertSame(array('b', 'c'), $this->list->getChoicesForValues($values)); - } - - public function testGetValuesForChoices() - { - $choices = array('b', 'c'); - $this->assertSame(array('b', 'c'), $this->list->getValuesForChoices($choices)); - } - - /** - * @expectedException \Symfony\Component\Form\Exception\InvalidArgumentException - */ - public function testLoadChoiceListShouldReturnChoiceList() - { - $list = new LazyChoiceListTest_InvalidImpl(); - - $list->getChoices(); - } -} - -class LazyChoiceListTest_Impl extends LazyChoiceList -{ - private $choiceList; - - public function __construct($choiceList) - { - $this->choiceList = $choiceList; - } - - protected function loadChoiceList() - { - return $this->choiceList; - } -} - -class LazyChoiceListTest_InvalidImpl extends LazyChoiceList -{ - protected function loadChoiceList() - { - return new \stdClass(); - } -} -- cgit v1.2.3