@@ -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
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
*/
@@ -662,10 +634,6 @@ public function testResolveFailsIfNotInstanceOfClass()
662
634
$ this ->resolver ->resolve ();
663
635
}
664
636
665
- ////////////////////////////////////////////////////////////////////////////
666
- // addAllowedTypes()
667
- ////////////////////////////////////////////////////////////////////////////
668
-
669
637
/**
670
638
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
671
639
*/
@@ -748,10 +716,6 @@ public function testAddAllowedTypesDoesNotOverwrite2()
748
716
$ this ->assertNotEmpty ($ this ->resolver ->resolve ());
749
717
}
750
718
751
- ////////////////////////////////////////////////////////////////////////////
752
- // setAllowedValues()
753
- ////////////////////////////////////////////////////////////////////////////
754
-
755
719
/**
756
720
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
757
721
*/
@@ -903,10 +867,6 @@ function () { return false; },
903
867
$ this ->assertEquals (array ('foo ' => 'bar ' ), $ this ->resolver ->resolve ());
904
868
}
905
869
906
- ////////////////////////////////////////////////////////////////////////////
907
- // addAllowedValues()
908
- ////////////////////////////////////////////////////////////////////////////
909
-
910
870
/**
911
871
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
912
872
*/
@@ -1023,10 +983,6 @@ public function testResolveSucceedsIfAnyAddedClosureReturnsTrue2()
1023
983
$ this ->assertEquals (array ('foo ' => 'bar ' ), $ this ->resolver ->resolve ());
1024
984
}
1025
985
1026
- ////////////////////////////////////////////////////////////////////////////
1027
- // setNormalizer()
1028
- ////////////////////////////////////////////////////////////////////////////
1029
-
1030
986
public function testSetNormalizerReturnsThis ()
1031
987
{
1032
988
$ this ->resolver ->setDefault ('foo ' , 'bar ' );
@@ -1278,10 +1234,6 @@ public function testNormalizerNotCalledForUnsetOptions()
1278
1234
$ this ->assertEmpty ($ this ->resolver ->resolve ());
1279
1235
}
1280
1236
1281
- ////////////////////////////////////////////////////////////////////////////
1282
- // setDefaults()
1283
- ////////////////////////////////////////////////////////////////////////////
1284
-
1285
1237
public function testSetDefaultsReturnsThis ()
1286
1238
{
1287
1239
$ this ->assertSame ($ this ->resolver , $ this ->resolver ->setDefaults (array ('foo ' , 'bar ' )));
@@ -1316,10 +1268,6 @@ public function testFailIfSetDefaultsFromLazyOption()
1316
1268
$ this ->resolver ->resolve ();
1317
1269
}
1318
1270
1319
- ////////////////////////////////////////////////////////////////////////////
1320
- // remove()
1321
- ////////////////////////////////////////////////////////////////////////////
1322
-
1323
1271
public function testRemoveReturnsThis ()
1324
1272
{
1325
1273
$ this ->resolver ->setDefault ('foo ' , 'bar ' );
@@ -1408,10 +1356,6 @@ public function testRemoveUnknownOptionIgnored()
1408
1356
$ this ->assertNotNull ($ this ->resolver ->remove ('foo ' ));
1409
1357
}
1410
1358
1411
- ////////////////////////////////////////////////////////////////////////////
1412
- // clear()
1413
- ////////////////////////////////////////////////////////////////////////////
1414
-
1415
1359
public function testClearReturnsThis ()
1416
1360
{
1417
1361
$ this ->assertSame ($ this ->resolver , $ this ->resolver ->clear ());
@@ -1498,10 +1442,6 @@ public function testClearOptionAndNormalizer()
1498
1442
$ this ->assertEmpty ($ this ->resolver ->resolve ());
1499
1443
}
1500
1444
1501
- ////////////////////////////////////////////////////////////////////////////
1502
- // ArrayAccess
1503
- ////////////////////////////////////////////////////////////////////////////
1504
-
1505
1445
public function testArrayAccess ()
1506
1446
{
1507
1447
$ this ->resolver ->setDefault ('default1 ' , 0 );
@@ -1616,10 +1556,6 @@ public function testFailIfCyclicDependency()
1616
1556
$ this ->resolver ->resolve ();
1617
1557
}
1618
1558
1619
- ////////////////////////////////////////////////////////////////////////////
1620
- // Countable
1621
- ////////////////////////////////////////////////////////////////////////////
1622
-
1623
1559
public function testCount ()
1624
1560
{
1625
1561
$ this ->resolver ->setDefault ('default ' , 0 );
0 commit comments