Skip to content

Commit 45cdcc8

Browse files
Merge branch '4.0' into 4.1
* 4.0: [HttpKernel] Fix restoring trusted proxies in tests Update UPGRADE-4.0.md CODEOWNERS: some more rules removed unneeded comments in tests removed unneeded comments in tests Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs [HttpKernel] fix registering IDE links [HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer. [Process] Consider \"executable\" suffixes first on Windows Triggering RememberMe's loginFail() when token cannot be created [Serializer] Fix serializer tries to denormalize null values on nullable properties [FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING
2 parents 9b9ab60 + ea9aacb commit 45cdcc8

File tree

1 file changed

+0
-64
lines changed

1 file changed

+0
-64
lines changed

Tests/OptionsResolverTest.php

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ protected function setUp()
2929
$this->resolver = new OptionsResolver();
3030
}
3131

32-
////////////////////////////////////////////////////////////////////////////
33-
// resolve()
34-
////////////////////////////////////////////////////////////////////////////
35-
3632
/**
3733
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
3834
* @expectedExceptionMessage The option "foo" does not exist. Defined options are: "a", "z".
@@ -69,10 +65,6 @@ public function testResolveFailsFromLazyOption()
6965
$this->resolver->resolve();
7066
}
7167

72-
////////////////////////////////////////////////////////////////////////////
73-
// setDefault()/hasDefault()
74-
////////////////////////////////////////////////////////////////////////////
75-
7668
public function testSetDefaultReturnsThis()
7769
{
7870
$this->assertSame($this->resolver, $this->resolver->setDefault('foo', 'bar'));
@@ -115,10 +107,6 @@ public function testHasDefaultWithNullValue()
115107
$this->assertTrue($this->resolver->hasDefault('foo'));
116108
}
117109

118-
////////////////////////////////////////////////////////////////////////////
119-
// lazy setDefault()
120-
////////////////////////////////////////////////////////////////////////////
121-
122110
public function testSetLazyReturnsThis()
123111
{
124112
$this->assertSame($this->resolver, $this->resolver->setDefault('foo', function (Options $options) {}));
@@ -232,10 +220,6 @@ public function testInvokeEachLazyOptionOnlyOnce()
232220
$this->assertSame(2, $calls);
233221
}
234222

235-
////////////////////////////////////////////////////////////////////////////
236-
// setRequired()/isRequired()/getRequiredOptions()
237-
////////////////////////////////////////////////////////////////////////////
238-
239223
public function testSetRequiredReturnsThis()
240224
{
241225
$this->assertSame($this->resolver, $this->resolver->setRequired('foo'));
@@ -330,10 +314,6 @@ public function testGetRequiredOptions()
330314
$this->assertSame(array('foo', 'bar'), $this->resolver->getRequiredOptions());
331315
}
332316

333-
////////////////////////////////////////////////////////////////////////////
334-
// isMissing()/getMissingOptions()
335-
////////////////////////////////////////////////////////////////////////////
336-
337317
public function testIsMissingIfNotSet()
338318
{
339319
$this->assertFalse($this->resolver->isMissing('foo'));
@@ -373,10 +353,6 @@ public function testGetMissingOptions()
373353
$this->assertSame(array('bar'), $this->resolver->getMissingOptions());
374354
}
375355

376-
////////////////////////////////////////////////////////////////////////////
377-
// setDefined()/isDefined()/getDefinedOptions()
378-
////////////////////////////////////////////////////////////////////////////
379-
380356
/**
381357
* @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException
382358
*/
@@ -474,10 +450,6 @@ public function testClearedOptionsAreNotDefined()
474450
$this->assertFalse($this->resolver->isDefined('foo'));
475451
}
476452

477-
////////////////////////////////////////////////////////////////////////////
478-
// setAllowedTypes()
479-
////////////////////////////////////////////////////////////////////////////
480-
481453
/**
482454
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
483455
*/
@@ -662,10 +634,6 @@ public function testResolveFailsIfNotInstanceOfClass()
662634
$this->resolver->resolve();
663635
}
664636

665-
////////////////////////////////////////////////////////////////////////////
666-
// addAllowedTypes()
667-
////////////////////////////////////////////////////////////////////////////
668-
669637
/**
670638
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
671639
*/
@@ -748,10 +716,6 @@ public function testAddAllowedTypesDoesNotOverwrite2()
748716
$this->assertNotEmpty($this->resolver->resolve());
749717
}
750718

751-
////////////////////////////////////////////////////////////////////////////
752-
// setAllowedValues()
753-
////////////////////////////////////////////////////////////////////////////
754-
755719
/**
756720
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
757721
*/
@@ -903,10 +867,6 @@ function () { return false; },
903867
$this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve());
904868
}
905869

906-
////////////////////////////////////////////////////////////////////////////
907-
// addAllowedValues()
908-
////////////////////////////////////////////////////////////////////////////
909-
910870
/**
911871
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
912872
*/
@@ -1023,10 +983,6 @@ public function testResolveSucceedsIfAnyAddedClosureReturnsTrue2()
1023983
$this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve());
1024984
}
1025985

1026-
////////////////////////////////////////////////////////////////////////////
1027-
// setNormalizer()
1028-
////////////////////////////////////////////////////////////////////////////
1029-
1030986
public function testSetNormalizerReturnsThis()
1031987
{
1032988
$this->resolver->setDefault('foo', 'bar');
@@ -1278,10 +1234,6 @@ public function testNormalizerNotCalledForUnsetOptions()
12781234
$this->assertEmpty($this->resolver->resolve());
12791235
}
12801236

1281-
////////////////////////////////////////////////////////////////////////////
1282-
// setDefaults()
1283-
////////////////////////////////////////////////////////////////////////////
1284-
12851237
public function testSetDefaultsReturnsThis()
12861238
{
12871239
$this->assertSame($this->resolver, $this->resolver->setDefaults(array('foo', 'bar')));
@@ -1316,10 +1268,6 @@ public function testFailIfSetDefaultsFromLazyOption()
13161268
$this->resolver->resolve();
13171269
}
13181270

1319-
////////////////////////////////////////////////////////////////////////////
1320-
// remove()
1321-
////////////////////////////////////////////////////////////////////////////
1322-
13231271
public function testRemoveReturnsThis()
13241272
{
13251273
$this->resolver->setDefault('foo', 'bar');
@@ -1408,10 +1356,6 @@ public function testRemoveUnknownOptionIgnored()
14081356
$this->assertNotNull($this->resolver->remove('foo'));
14091357
}
14101358

1411-
////////////////////////////////////////////////////////////////////////////
1412-
// clear()
1413-
////////////////////////////////////////////////////////////////////////////
1414-
14151359
public function testClearReturnsThis()
14161360
{
14171361
$this->assertSame($this->resolver, $this->resolver->clear());
@@ -1498,10 +1442,6 @@ public function testClearOptionAndNormalizer()
14981442
$this->assertEmpty($this->resolver->resolve());
14991443
}
15001444

1501-
////////////////////////////////////////////////////////////////////////////
1502-
// ArrayAccess
1503-
////////////////////////////////////////////////////////////////////////////
1504-
15051445
public function testArrayAccess()
15061446
{
15071447
$this->resolver->setDefault('default1', 0);
@@ -1616,10 +1556,6 @@ public function testFailIfCyclicDependency()
16161556
$this->resolver->resolve();
16171557
}
16181558

1619-
////////////////////////////////////////////////////////////////////////////
1620-
// Countable
1621-
////////////////////////////////////////////////////////////////////////////
1622-
16231559
public function testCount()
16241560
{
16251561
$this->resolver->setDefault('default', 0);

0 commit comments

Comments
 (0)