Skip to content

Commit

Permalink
EZEE-3465: Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed Feb 8, 2021
1 parent e5c9818 commit f70ffce
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,26 @@ public function testGetRepositoryConfigUndefinedRepository()
$provider->getRepositoryConfig();
}

public function testGetDefaultAndCurrentRepositoryAlias(): void
{
$configResolver = $this->getConfigResolverMock();

$repositories = [
'first' => [
'engine' => 'foo',
],
'second' => [
'engine' => 'bar',
],
];

$provider = new RepositoryConfigurationProvider($configResolver, $repositories);
$provider->getRepositoryConfig();

$this->assertSame('first', $provider->getDefaultRepositoryAlias());
$this->assertSame('first', $provider->getCurrentRepositoryAlias());
}

/**
* @return \PHPUnit\Framework\MockObject\MockObject|\eZ\Publish\Core\MVC\ConfigResolverInterface
*/
Expand Down

0 comments on commit f70ffce

Please sign in to comment.