File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Tests/DependencyInjection Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 12
12
namespace Symfony \Bundle \FrameworkBundle \Tests \DependencyInjection ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
16
use Symfony \Bundle \FrameworkBundle \DependencyInjection \Configuration ;
16
17
use Symfony \Bundle \FullStack ;
17
18
use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
20
21
21
22
class ConfigurationTest extends TestCase
22
23
{
24
+ use ForwardCompatTestTrait;
25
+
23
26
public function testDefaultConfig ()
24
27
{
25
28
$ processor = new Processor ();
@@ -245,12 +248,8 @@ public function provideValidAssetsPackageNameConfigurationTests()
245
248
*/
246
249
public function testInvalidAssetsConfiguration (array $ assetConfig , $ expectedMessage )
247
250
{
248
- if (method_exists ($ this , 'expectException ' )) {
249
- $ this ->expectException (InvalidConfigurationException::class);
250
- $ this ->expectExceptionMessage ($ expectedMessage );
251
- } else {
252
- $ this ->setExpectedException (InvalidConfigurationException::class, $ expectedMessage );
253
- }
251
+ $ this ->expectException (InvalidConfigurationException::class);
252
+ $ this ->expectExceptionMessage ($ expectedMessage );
254
253
255
254
$ processor = new Processor ();
256
255
$ configuration = new Configuration (true );
You can’t perform that action at this time.
0 commit comments