@@ -29,10 +29,6 @@ protected function setUp()
29
29
$ this ->resolver = new OptionsResolver ();
30
30
}
31
31
32
- ////////////////////////////////////////////////////////////////////////////
33
- // resolve()
34
- ////////////////////////////////////////////////////////////////////////////
35
-
36
32
/**
37
33
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
38
34
* @expectedExceptionMessage The option "foo" does not exist. Defined options are: "a", "z".
@@ -69,10 +65,6 @@ public function testResolveFailsFromLazyOption()
69
65
$ this ->resolver ->resolve ();
70
66
}
71
67
72
- ////////////////////////////////////////////////////////////////////////////
73
- // setDefault()/hasDefault()
74
- ////////////////////////////////////////////////////////////////////////////
75
-
76
68
public function testSetDefaultReturnsThis ()
77
69
{
78
70
$ this ->assertSame ($ this ->resolver , $ this ->resolver ->setDefault ('foo ' , 'bar ' ));
@@ -115,10 +107,6 @@ public function testHasDefaultWithNullValue()
115
107
$ this ->assertTrue ($ this ->resolver ->hasDefault ('foo ' ));
116
108
}
117
109
118
- ////////////////////////////////////////////////////////////////////////////
119
- // lazy setDefault()
120
- ////////////////////////////////////////////////////////////////////////////
121
-
122
8000
110
public function testSetLazyReturnsThis ()
123
111
{
124
112
$ this ->assertSame ($ this ->resolver , $ this ->resolver ->setDefault ('foo ' , function (Options $ options ) {}));
@@ -232,10 +220,6 @@ public function testInvokeEachLazyOptionOnlyOnce()
232
220
$ this ->assertSame (2 , $ calls );
233
221
}
234
222
235
- ////////////////////////////////////////////////////////////////////////////
236
- // setRequired()/isRequired()/getRequiredOptions()
237
- ////////////////////////////////////////////////////////////////////////////
238
-
239
223
public function testSetRequiredReturnsThis ()
240
224
{
241
225
$ this ->assertSame ($ this ->resolver , $ this ->resolver ->setRequired ('foo ' ));
@@ -330,10 +314,6 @@ public function testGetRequiredOptions()
330
314
$ this ->assertSame (array ('foo ' , 'bar ' ), $ this ->resolver ->getRequiredOptions ());
331
315
}
332
316
333
- ////////////////////////////////////////////////////////////////////////////
334
- // isMissing()/getMissingOptions()
335
- ////////////////////////////////////////////////////////////////////////////
336
-
337
317
public function testIsMissingIfNotSet ()
338
318
{
339
319
$ this ->assertFalse ($ this ->resolver ->isMissing ('foo ' ));
@@ -373,10 +353,6 @@ public function testGetMissingOptions()
373
353
$ this ->assertSame (array ('bar ' ), $ this ->resolver ->getMissingOptions ());
374
354
}
375
355
376
- ////////////////////////////////////////////////////////////////////////////
377
- // setDefined()/isDefined()/getDefinedOptions()
378
- ////////////////////////////////////////////////////////////////////////////
379
-
380
356
/**
381
357
* @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException
382
358
*/
@@ -474,10 +450,6 @@ public function testClearedOptionsAreNotDefined()
474
450
$ this ->assertFalse ($ this ->resolver ->isDefined ('foo ' ));
475
451
}
476
452
477
- ////////////////////////////////////////////////////////////////////////////
478
- // setAllowedTypes()
479
- ////////////////////////////////////////////////////////////////////////////
480
-
481
453
/**
482
454
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
483
455
*/
@@ -568,10 +540,6 @@ public function testResolveSucceedsIfInstanceOfClass()
568
540
$ this ->assertNotEmpty ($ this ->resolver ->resolve ());
569
541
}
570
542
571
- ////////////////////////////////////////////////////////////////////////////
572
- // addAllowedTypes()
573
- ////////////////////////////////////////////////////////////////////////////
574
-
575
543
/**
576
544
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
577
545
*/
@@ -654,10 +622,6 @@ public function testAddAllowedTypesDoesNotOverwrite2()
654
622
$ this ->assertNotEmpty ($ this ->resolver ->resolve ());
655
623
}
656
624
657
- ////////////////////////////////////////////////////////////////////////////
658
- // setAllowedValues()
659
- ////////////////////////////////////////////////////////////////////////////
660
-
661
625
/**
662
626
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
663
627
*/
@@ -809,10 +773,6 @@ function () { return false; },
809
773
$ this ->assertEquals (array ('foo ' => 'bar ' ), $ this ->resolver ->resolve ());
810
774
}
811
775
812
- ////////////////////////////////////////////////////////////////////////////
813
- // addAllowedValues()
814
- ////////////////////////////////////////////////////////////////////////////
815
-
816
776
/**
817
777
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
818
778
*/
@@ -929,10 +889,6 @@ public function testResolveSucceedsIfAnyAddedClosureReturnsTrue2()
929
889
$ this ->assertEquals (array ('foo ' => 'bar ' ), $ this ->resolver ->res
A3E2
olve ());
930
890
}
931
891
932
- ////////////////////////////////////////////////////////////////////////////
933
- // setNormalizer()
934
- ////////////////////////////////////////////////////////////////////////////
935
-
936
892
public function testSetNormalizerReturnsThis ()
937
893
{
938
894
$ this ->resolver ->setDefault ('foo ' , 'bar ' );
@@ -1184,10 +1140,6 @@ public function testNormalizerNotCalledForUnsetOptions()
1184
1140
$ this ->assertEmpty ($ this ->resolver ->resolve ());
1185
1141
}
1186
1142
1187
- ////////////////////////////////////////////////////////////////////////////
1188
- // setDefaults()
1189
- ////////////////////////////////////////////////////////////////////////////
1190
-
1191
1143
public function testSetDefaultsReturnsThis ()
1192
1144
{
1193
1145
$ this ->assertSame ($ this ->resolver , $ this ->resolver ->setDefaults (array ('foo ' , 'bar ' )));
@@ -1222,10 +1174,6 @@ public function testFailIfSetDefaultsFromLazyOption()
1222
1174
$ this ->resolver ->resolve ();
1223
1175
}
1224
1176
1225
- ////////////////////////////////////////////////////////////////////////////
1226
- // remove()
1227
- ////////////////////////////////////////////////////////////////////////////
1228
-
1229
1177
public function testRemoveReturnsThis ()
1230
1178
{
1231
1179
$ this ->resolver ->setDefault ('foo ' , 'bar ' );
@@ -1314,10 +1262,6 @@ public function testRemoveUnknownOptionIgnored()
1314
1262
$ this ->assertNotNull ($ this ->resolver ->remove ('foo ' ));
1315
1263
}
1316
1264
1317
- ////////////////////////////////////////////////////////////////////////////
1318
- // clear()
1319
- ////////////////////////////////////////////////////////////////////////////
1320
-
1321
1265
public function testClearReturnsThis ()
1322
1266
{
1323
1267
$ this ->assertSame ($ this ->resolver , $ this ->resolver ->clear ());
@@ -1404,10 +1348,6 @@ public function testClearOptionAndNormalizer()
1404
1348
$ this ->assertEmpty ($ this ->resolver ->resolve ());
1405
1349
}
1406
1350
1407
- ////////////////////////////////////////////////////////////////////////////
1408
- // ArrayAccess
1409
- ////////////////////////////////////////////////////////////////////////////
1410
-
1411
1351
public function testArrayAccess ()
1412
1352
{
1413
1353
$ this ->resolver ->setDefault ('default1 ' , 0 );
@@ -1522,10 +1462,6 @@ public function testFailIfCyclicDependency()
1522
1462
$ this ->resolver ->resolve ();
1523
1463
}
1524
1464
1525
- ////////////////////////////////////////////////////////////////////////////
1526
- // Countable
1527
- ////////////////////////////////////////////////////////////////////////////
1528
-
1529
1465
public function testCount ()
1530
1466
{
1531
1467
$ this ->resolver ->setDefault ('default ' , 0 );
0 commit comments