Skip to content

Conversation

@ker0x
Copy link
Contributor

@ker0x ker0x commented Dec 3, 2019

Exception on missing configuration was only thrown when using a command. This fix that by moving Exception directly into getConfiguration() method which is also called in WebUIController

Copy link
Member

@odolbeau odolbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ker0x!
I added a few (not really important) comments but it looks fine for me. 👍

$manager->addConfiguration('default', $correctConfiguration);

$this->assertNull($manager->getConfiguration('missing'));
$config = $manager->getConfiguration('missing');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed 👍


public function testGetConfigurationMissing(): void
{
$this->expectException(\InvalidArgumentException::class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move those line just before $manager->getConfiguration('missing'); as it's where you expect the test to fail?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fixed !

@ker0x ker0x force-pushed the get-configuration-exception branch from c0223ae to 4986c3c Compare December 3, 2019 08:46
@odolbeau
Copy link
Member

odolbeau commented Dec 3, 2019

Perfect! 👍

@odolbeau odolbeau merged commit ceccbde into php-translation:master Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants