Skip to content

Commit 16085b7

Browse files
[2.3] Remove useless tests skips
1 parent b430298 commit 16085b7

19 files changed

+0
-142
lines changed

Test/FormIntegrationTestCase.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ abstract class FormIntegrationTestCase extends \PHPUnit_Framework_TestCase
2626

2727
protected function setUp()
2828
{
29-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
30-
$this->markTestSkipped('The "EventDispatcher" component is not available');
31-
}
32-
3329
$this->factory = Forms::createFormFactoryBuilder()
3430
->addExtensions($this->getExtensions())
3531
->getFormFactory();

Tests/AbstractFormTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ abstract class AbstractFormTest extends \PHPUnit_Framework_TestCase
3434

3535
protected function setUp()
3636
{
37-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
38-
$this->markTestSkipped('The "EventDispatcher" component is not available');
39-
}
40-
4137
// We need an actual dispatcher to use the deprecated
4238
// bindRequest() method
4339
$this->dispatcher = new EventDispatcher();

Tests/CompoundFormTest.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -583,10 +583,6 @@ public function requestMethodProvider()
583583
*/
584584
public function testSubmitPostOrPutRequest($method)
585585
{
586-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
587-
$this->markTestSkipped('The "HttpFoundation" component is not available');
588-
}
589-
590586
$path = tempnam(sys_get_temp_dir(), 'sf2');
591587
touch($path);
592588

@@ -635,10 +631,6 @@ public function testSubmitPostOrPutRequest($method)
635631
*/
636632
public function testSubmitPostOrPutRequestWithEmptyRootFormName($method)
637633
{
638-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
639-
$this->markTestSkipped('The "HttpFoundation" component is not available');
640-
}
641-
642634
$path = tempnam(sys_get_temp_dir(), 'sf2');
643635
touch($path);
644636

@@ -686,10 +678,6 @@ public function testSubmitPostOrPutRequestWithEmptyRootFormName($method)
686678
*/
687679
public function testSubmitPostOrPutRequestWithSingleChildForm($method)
688680
{
689-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
690-
$this->markTestSkipped('The "HttpFoundation" component is not available');
691-
}
692-
693681
$path = tempnam(sys_get_temp_dir(), 'sf2');
694682
touch($path);
695683

@@ -726,10 +714,6 @@ public function testSubmitPostOrPutRequestWithSingleChildForm($method)
726714
*/
727715
public function testSubmitPostOrPutRequestWithSingleChildFormUploadedFile($method)
728716
{
729-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
730-
$this->markTestSkipped('The "HttpFoundation" component is not available');
731-
}
732-
733717
$path = tempnam(sys_get_temp_dir(), 'sf2');
734718
touch($path);
735719

@@ -755,10 +739,6 @@ public function testSubmitPostOrPutRequestWithSingleChildFormUploadedFile($metho
755739

756740
public function testSubmitGetRequest()
757741
{
758-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
759-
$this->markTestSkipped('The "HttpFoundation" component is not available');
760-
}
761-
762742
$values = array(
763743
'author' => array(
764744
'firstName' => 'Bernhard',
@@ -787,10 +767,6 @@ public function testSubmitGetRequest()
787767

788768
public function testSubmitGetRequestWithEmptyRootFormName()
789769
{
790-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
791-
$this->markTestSkipped('The "HttpFoundation" component is not available');
792-
}
793-
794770
$values = array(
795771
'firstName' => 'Bernhard',
796772
'lastName' => 'Schussek',

Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ class PropertyPathMapperTest extends \PHPUnit_Framework_TestCase
3434

3535
protected function setUp()
3636
{
37-
if (!class_exists('Symfony\Component\EventDispatcher\Event')) {
38-
$this->markTestSkipped('The "EventDispatcher" component is not available');
39-
}
40-
41-
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccess')) {
42-
$this->markTestSkipped('The "PropertyAccess" component is not available');
43-
}
44-
4537
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
4638
$this->propertyAccessor = $this->getMock('Symfony\Component\PropertyAccess\PropertyAccessorInterface');
4739
$this->mapper = new PropertyPathMapper($this->propertyAccessor);

Tests/Extension/Core/EventListener/FixRadioInputListenerTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ class FixRadioInputListenerTest extends \PHPUnit_Framework_TestCase
2121

2222
protected function setUp()
2323
{
24-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
25-
$this->markTestSkipped('The "EventDispatcher" component is not available');
26-
}
27-
2824
parent::setUp();
2925

3026
$this->choiceList = new SimpleChoiceList(array('' => 'Empty', 0 => 'A', 1 => 'B'));

Tests/Extension/Core/EventListener/FixUrlProtocolListenerTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@
1616

1717
class FixUrlProtocolListenerTest extends \PHPUnit_Framework_TestCase
1818
{
19-
protected function setUp()
20-
{
21-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
22-
$this->markTestSkipped('The "EventDispatcher" component is not available');
23-
}
24-
}
25-
2619
public function testFixHttpUrl()
2720
{
2821
$data = "www.symfony.com";

Tests/Extension/Core/EventListener/MergeCollectionListenerTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ abstract class MergeCollectionListenerTest extends \PHPUnit_Framework_TestCase
2222

2323
protected function setUp()
2424
{
25-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
26-
$this->markTestSkipped('The "EventDispatcher" component is not available');
27-
}
28-
2925
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
3026
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
3127
$this->form = $this->getForm('axes');

Tests/Extension/Core/EventListener/ResizeFormListenerTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ class ResizeFormListenerTest extends \PHPUnit_Framework_TestCase
2424

2525
protected function setUp()
2626
{
27-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
28-
$this->markTestSkipped('The "EventDispatcher" component is not available');
29-
}
30-
3127
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
3228
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
3329
$this->form = $this->getBuilder()

Tests/Extension/Core/EventListener/TrimListenerTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@
1616

1717
class TrimListenerTest extends \PHPUnit_Framework_TestCase
1818
{
19-
protected function setUp()
20-
{
21-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
22-
$this->markTestSkipped('The "EventDispatcher" component is not available');
23-
}
24-
}
25-
2619
public function testTrim()
2720
{
2821
$data = " Foo! ";

Tests/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ class SessionCsrfProviderTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23-
if (!class_exists('Symfony\Component\HttpFoundation\Session\Session')) {
24-
$this->markTestSkipped('The "HttpFoundation" component is not available');
25-
}
26-
2723
$this->session = $this->getMock(
2824
'Symfony\Component\HttpFoundation\Session\Session',
2925
array(),

Tests/Extension/Csrf/EventListener/CsrfValidationListenerTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ class CsrfValidationListenerTest extends \PHPUnit_Framework_TestCase
2323

2424
protected function setUp()
2525
{
26-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
27-
$this->markTestSkipped('The "EventDispatcher" component is not available');
28-
}
29-
3026
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
3127
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
3228
$this->csrfProvider = $this->getMock('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface');

Tests/Extension/HttpFoundation/EventListener/LegacyBindRequestListenerTest.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ public function requestMethodProvider()
8787
*/
8888
public function testSubmitRequest($method)
8989
{
90-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
91-
$this->markTestSkipped('The "HttpFoundation" component is not available');
92-
}
93-
9490
$values = array('author' => $this->values);
9591
$files = array('author' => $this->filesNested);
9692
$request = new Request(array(), $values, array(), array(), $files, array(
@@ -116,10 +112,6 @@ public function testSubmitRequest($method)
116112
*/
117113
public function testSubmitRequestWithEmptyName($method)
118114
{
119-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
120-
$this->markTestSkipped('The "HttpFoundation" component is not available');
121-
}
122-
123115
$request = new Request(array(), $this->values, array(), array(), $this->filesPlain, array(
124116
'REQUEST_METHOD' => $method,
125117
));
@@ -143,10 +135,6 @@ public function testSubmitRequestWithEmptyName($method)
143135
*/
144136
public function testSubmitEmptyRequestToCompoundForm($method)
145137
{
146-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
147-
$this->markTestSkipped('The "HttpFoundation" component is not available');
148-
}
149-
150138
$request = new Request(array(), array(), array(), array(), array(), array(
151139
'REQUEST_METHOD' => $method,
152140
));
@@ -170,10 +158,6 @@ public function testSubmitEmptyRequestToCompoundForm($method)
170158
*/
171159
public function testSubmitEmptyRequestToSimpleForm($method)
172160
{
173-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
174-
$this->markTestSkipped('The "HttpFoundation" component is not available');
175-
}
176-
177161
$request = new Request(array(), array(), array(), array(), array(), array(
178162
'REQUEST_METHOD' => $method,
179163
));
@@ -193,10 +177,6 @@ public function testSubmitEmptyRequestToSimpleForm($method)
193177

194178
public function testSubmitGetRequest()
195179
{
196-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
197-
$this->markTestSkipped('The "HttpFoundation" component is not available');
198-
}
199-
200180
$values = array('author' => $this->values);
201181
$request = new Request($values, array(), array(), array(), array(), array(
202182
'REQUEST_METHOD' => 'GET',
@@ -218,10 +198,6 @@ public function testSubmitGetRequest()
218198

219199
public function testSubmitGetRequestWithEmptyName()
220200
{
221-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
222-
$this->markTestSkipped('The "HttpFoundation" component is not available');
223-
}
224-
225201
$request = new Request($this->values, array(), array(), array(), array(), array(
226202
'REQUEST_METHOD' => 'GET',
227203
));
@@ -242,10 +218,6 @@ public function testSubmitGetRequestWithEmptyName()
242218

243219
public function testSubmitEmptyGetRequestToCompoundForm()
244220
{
245-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
246-
$this->markTestSkipped('The "HttpFoundation" component is not available');
247-
}
248-
249221
$request = new Request(array(), array(), array(), array(), array(), array(
250222
'REQUEST_METHOD' => 'GET',
251223
));
@@ -265,10 +237,6 @@ public function testSubmitEmptyGetRequestToCompoundForm()
265237

266238
public function testSubmitEmptyGetRequestToSimpleForm()
267239
{
268-
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
269-
$this->markTestSkipped('The "HttpFoundation" component is not available');
270-
}
271-
272240
$request = new Request(array(), array(), array(), array(), array(), array(
273241
'REQUEST_METHOD' => 'GET',
274242
));

Tests/Extension/Validator/EventListener/ValidationListenerTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ class ValidationListenerTest extends \PHPUnit_Framework_TestCase
5353

5454
protected function setUp()
5555
{
56-
if (!class_exists('Symfony\Component\EventDispatcher\Event')) {
57-
$this->markTestSkipped('The "EventDispatcher" component is not available');
58-
}
59-
6056
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
6157
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
6258
$this->validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface');

Tests/Extension/Validator/Type/TypeTestCase.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ abstract class TypeTestCase extends BaseTypeTestCase
2020

2121
protected function setUp()
2222
{
23-
if (!class_exists('Symfony\Component\Validator\Constraint')) {
24-
$this->markTestSkipped('The "Validator" component is not available');
25-
}
26-
2723
$this->validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface');
2824
$metadataFactory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface');
2925
$this->validator->expects($this->once())->method('getMetadataFactory')->will($this->returnValue($metadataFactory));

Tests/Extension/Validator/ValidatorTypeGuesserTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ class ValidatorTypeGuesserTest extends \PHPUnit_Framework_TestCase
5050

5151
protected function setUp()
5252
{
53-
if (!class_exists('Symfony\Component\Validator\Constraint')) {
54-
$this->markTestSkipped('The "Validator" component is not available');
55-
}
56-
5753
$this->metadata = new ClassMetadata(self::TEST_CLASS);
5854
$this->metadataFactory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface');
5955
$this->metadataFactory->expects($this->any())

Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ class ViolationMapperTest extends \PHPUnit_Framework_TestCase
6060

6161
protected function setUp()
6262
{
63-
if (!class_exists('Symfony\Component\EventDispatcher\Event')) {
64-
$this->markTestSkipped('The "EventDispatcher" component is not available');
65-
}
66-
6763
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
6864
$this->mapper = new ViolationMapper();
6965
$this->message = 'Message';

Tests/FormBuilderTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ class FormBuilderTest extends \PHPUnit_Framework_TestCase
2121

2222
protected function setUp()
2323
{
24-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
25-
$this->markTestSkipped('The "EventDispatcher" component is not available');
26-
}
27-
2824
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
2925
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
3026
$this->builder = new FormBuilder('name', null, $this->dispatcher, $this->factory);

Tests/FormFactoryTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ class FormFactoryTest extends \PHPUnit_Framework_TestCase
5252

5353
protected function setUp()
5454
{
55-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
56-
$this->markTestSkipped('The "EventDispatcher" component is not available');
57-
}
58-
5955
$this->resolvedTypeFactory = $this->getMock('Symfony\Component\Form\ResolvedFormTypeFactoryInterface');
6056
$this->guesser1 = $this->getMock('Symfony\Component\Form\FormTypeGuesserInterface');
6157
$this->guesser2 = $this->getMock('Symfony\Component\Form\FormTypeGuesserInterface');

Tests/ResolvedFormTypeTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,13 @@ class ResolvedFormTypeTest extends \PHPUnit_Framework_TestCase
3838

3939
protected function setUp()
4040
{
41-
if (!class_exists('Symfony\Component\OptionsResolver\OptionsResolver')) {
42-
$this->markTestSkipped('The "OptionsResolver" component is not available');
43-
}
44-
45-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
46-
$this->markTestSkipped('The "EventDispatcher" component is not available');
47-
}
48-
4941
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
5042
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
5143
$this->dataMapper = $this->getMock('Symfony\Component\Form\DataMapperInterface');
5244
}
5345

5446
public function testCreateBuilder()
5547
{
56-
if (version_compare(\PHPUnit_Runner_Version::id(), '3.7', '<')) {
57-
$this->markTestSkipped('This test requires PHPUnit 3.7.');
58-
}
59-
6048
$parentType = $this->getMockFormType();
6149
$type = $this->getMockFormType();
6250
$extension1 = $this->getMockFormTypeExtension();

0 commit comments

Comments
 (0)