Skip to content

Commit f0429d7

Browse files
[2.6] cleanup deprecated uses
1 parent 67c7fab commit f0429d7

File tree

3 files changed

+18
-24
lines changed

3 files changed

+18
-24
lines changed

Tests/OptionsResolverTest.php renamed to Tests/LegacyOptionsResolverTest.php

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
use Symfony\Component\OptionsResolver\OptionsResolver;
1515
use Symfony\Component\OptionsResolver\Options;
1616

17-
/**
18-
* @deprecated Deprecated since Symfony 2.6, to be removed in Symfony 3.0.
19-
*/
20-
class OptionsResolverTest extends \PHPUnit_Framework_TestCase
17+
class LegacyOptionsResolverTest extends \PHPUnit_Framework_TestCase
2118
{
2219
/**
2320
* @var OptionsResolver
@@ -26,6 +23,8 @@ class OptionsResolverTest extends \PHPUnit_Framework_TestCase
2623

2724
protected function setUp()
2825
{
26+
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
27+
2928
$this->resolver = new OptionsResolver();
3029
}
3130

@@ -702,4 +701,16 @@ public function testClone()
702701
'three' => '3',
703702
), $clone->resolve());
704703
}
704+
705+
public function testOverloadReturnsThis()
706+
{
707+
$this->assertSame($this->resolver, $this->resolver->overload('foo', 'bar'));
708+
}
709+
710+
public function testOverloadCallsSet()
711+
{
712+
$this->resolver->overload('foo', 'bar');
713+
714+
$this->assertSame(array('foo' => 'bar'), $this->resolver->resolve());
715+
}
705716
}

Tests/OptionsTest.php renamed to Tests/LegacyOptionsTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
use Symfony\Component\OptionsResolver\Options;
1515
use Symfony\Component\OptionsResolver\OptionsResolver;
1616

17-
/**
18-
* @deprecated Deprecated since Symfony 2.6, to be removed in Symfony 3.0.
19-
*/
20-
class OptionsTest extends \PHPUnit_Framework_TestCase
17+
class LegacyOptionsTest extends \PHPUnit_Framework_TestCase
2118
{
2219
/**
2320
* @var OptionsResolver
@@ -26,6 +23,8 @@ class OptionsTest extends \PHPUnit_Framework_TestCase
2623

2724
protected function setUp()
2825
{
26+
$this->iniSet('error_reporting', -1 & E_USER_DEPRECATED);
27+
2928
$this->options = new OptionsResolver();
3029
}
3130

Tests/OptionsResolver2Dot6Test.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,6 @@ public function testHasDefaultWithNullValue()
113113
$this->assertTrue($this->resolver->hasDefault('foo'));
114114
}
115115

116-
////////////////////////////////////////////////////////////////////////////
117-
// overload()
118-
////////////////////////////////////////////////////////////////////////////
119-
120-
public function testOverloadReturnsThis()
121-
{
122-
$this->assertSame($this->resolver, $this->resolver->overload('foo', 'bar'));
123-
}
124-
125-
public function testOverloadCallsSet()
126-
{
127-
$this->resolver->overload('foo', 'bar');
128-
129-
$this->assertSame(array('foo' => 'bar'), $this->resolver->resolve());
130-
}
131-
132116
////////////////////////////////////////////////////////////////////////////
133117
// lazy setDefault()
134118
////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)