diff --git a/tests/DependencyInjection/AwsExtensionTest.php b/tests/DependencyInjection/AwsExtensionTest.php index 48c6501..6c9fd1b 100644 --- a/tests/DependencyInjection/AwsExtensionTest.php +++ b/tests/DependencyInjection/AwsExtensionTest.php @@ -218,8 +218,6 @@ public function extension_should_validate_and_merge_configs() /** * @test - * - * @expectedException RuntimeException */ public function extension_should_error_merging_unknown_config_options() { @@ -235,6 +233,13 @@ public function extension_should_error_merging_unknown_config_options() ->setMethods(['getDefinition', 'replaceArgument']) ->getMock(); - $extension->load([$config, $configDev], $container); + try { + $extension->load([$config, $configDev], $container); + $this->fail('Should have thrown an Error or RuntimeException'); + } catch (\Exception $e) { + $this->assertTrue($e instanceof \RuntimeException); + } catch (\Throwable $e) { + $this->assertTrue($e instanceof \Error); + } } }