removed unneeded comments in tests
This commit is contained in:
parent
785b4319ad
commit
09c660d454
@ -29,10 +29,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->resolver = new OptionsResolver();
|
$this->resolver = new OptionsResolver();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// resolve()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
|
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
|
||||||
* @expectedExceptionMessage The option "foo" does not exist. Defined options are: "a", "z".
|
* @expectedExceptionMessage The option "foo" does not exist. Defined options are: "a", "z".
|
||||||
@ -69,10 +65,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->resolver->resolve();
|
$this->resolver->resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// setDefault()/hasDefault()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public function testSetDefaultReturnsThis()
|
public function testSetDefaultReturnsThis()
|
||||||
{
|
{
|
||||||
$this->assertSame($this->resolver, $this->resolver->setDefault('foo', 'bar'));
|
$this->assertSame($this->resolver, $this->resolver->setDefault('foo', 'bar'));
|
||||||
@ -115,10 +107,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertTrue($this->resolver->hasDefault('foo'));
|
$this->assertTrue($this->resolver->hasDefault('foo'));
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// lazy setDefault()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public function testSetLazyReturnsThis()
|
public function testSetLazyReturnsThis()
|
||||||
{
|
{
|
||||||
$this->assertSame($this->resolver, $this->resolver->setDefault('foo', function (Options $options) {}));
|
$this->assertSame($this->resolver, $this->resolver->setDefault('foo', function (Options $options) {}));
|
||||||
@ -232,10 +220,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertSame(2, $calls);
|
$this->assertSame(2, $calls);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// setRequired()/isRequired()/getRequiredOptions()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public function testSetRequiredReturnsThis()
|
public function testSetRequiredReturnsThis()
|
||||||
{
|
{
|
||||||
$this->assertSame($this->resolver, $this->resolver->setRequired('foo'));
|
$this->assertSame($this->resolver, $this->resolver->setRequired('foo'));
|
||||||
@ -330,10 +314,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertSame(array('foo', 'bar'), $this->resolver->getRequiredOptions());
|
$this->assertSame(array('foo', 'bar'), $this->resolver->getRequiredOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// isMissing()/getMissingOptions()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public function testIsMissingIfNotSet()
|
public function testIsMissingIfNotSet()
|
||||||
{
|
{
|
||||||
$this->assertFalse($this->resolver->isMissing('foo'));
|
$this->assertFalse($this->resolver->isMissing('foo'));
|
||||||
@ -373,10 +353,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertSame(array('bar'), $this->resolver->getMissingOptions());
|
$this->assertSame(array('bar'), $this->resolver->getMissingOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// setDefined()/isDefined()/getDefinedOptions()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException
|
* @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException
|
||||||
*/
|
*/
|
||||||
@ -474,10 +450,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertFalse($this->resolver->isDefined('foo'));
|
$this->assertFalse($this->resolver->isDefined('foo'));
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// setAllowedTypes()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
|
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
|
||||||
*/
|
*/
|
||||||
@ -568,10 +540,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertNotEmpty($this->resolver->resolve());
|
$this->assertNotEmpty($this->resolver->resolve());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// addAllowedTypes()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
|
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
|
||||||
*/
|
*/
|
||||||
@ -654,10 +622,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertNotEmpty($this->resolver->resolve());
|
$this->assertNotEmpty($this->resolver->resolve());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// setAllowedValues()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
|
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
|
||||||
*/
|
*/
|
||||||
@ -809,10 +773,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve());
|
$this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// addAllowedValues()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
|
* @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
|
||||||
*/
|
*/
|
||||||
@ -929,10 +889,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve());
|
$this->assertEquals(array('foo' => 'bar'), $this->resolver->resolve());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// setNormalizer()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public function testSetNormalizerReturnsThis()
|
public function testSetNormalizerReturnsThis()
|
||||||
{
|
{
|
||||||
$this->resolver->setDefault('foo', 'bar');
|
$this->resolver->setDefault('foo', 'bar');
|
||||||
@ -1184,10 +1140,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertEmpty($this->resolver->resolve());
|
$this->assertEmpty($this->resolver->resolve());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// setDefaults()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public function testSetDefaultsReturnsThis()
|
public function testSetDefaultsReturnsThis()
|
||||||
{
|
{
|
||||||
$this->assertSame($this->resolver, $this->resolver->setDefaults(array('foo', 'bar')));
|
$this->assertSame($this->resolver, $this->resolver->setDefaults(array('foo', 'bar')));
|
||||||
@ -1222,10 +1174,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->resolver->resolve();
|
$this->resolver->resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// remove()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public function testRemoveReturnsThis()
|
public function testRemoveReturnsThis()
|
||||||
{
|
{
|
||||||
$this->resolver->setDefault('foo', 'bar');
|
$this->resolver->setDefault('foo', 'bar');
|
||||||
@ -1314,10 +1262,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertNotNull($this->resolver->remove('foo'));
|
$this->assertNotNull($this->resolver->remove('foo'));
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// clear()
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public function testClearReturnsThis()
|
public function testClearReturnsThis()
|
||||||
{
|
{
|
||||||
$this->assertSame($this->resolver, $this->resolver->clear());
|
$this->assertSame($this->resolver, $this->resolver->clear());
|
||||||
@ -1404,10 +1348,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->assertEmpty($this->resolver->resolve());
|
$this->assertEmpty($this->resolver->resolve());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// ArrayAccess
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public function testArrayAccess()
|
public function testArrayAccess()
|
||||||
{
|
{
|
||||||
$this->resolver->setDefault('default1', 0);
|
$this->resolver->setDefault('default1', 0);
|
||||||
@ -1522,10 +1462,6 @@ class OptionsResolver2Dot6Test extends TestCase
|
|||||||
$this->resolver->resolve();
|
$this->resolver->resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Countable
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public function testCount()
|
public function testCount()
|
||||||
{
|
{
|
||||||
$this->resolver->setDefault('default', 0);
|
$this->resolver->setDefault('default', 0);
|
||||||
|
Reference in New Issue
Block a user