Skip to content

Commit

Permalink
Tweak AwsExtensionTest for different versions
Browse files Browse the repository at this point in the history
  • Loading branch information
howardlopez committed Mar 5, 2020
1 parent 0a66b85 commit 4fc844f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/DependencyInjection/AwsExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ public function extension_should_validate_and_merge_configs()

/**
* @test
*
* @expectedException RuntimeException
*/
public function extension_should_error_merging_unknown_config_options()
{
Expand All @@ -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);
}
}
}

0 comments on commit 4fc844f

Please sign in to comment.