mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-08 16:23:12 +08:00
Fixed all phpstan inspections on tests
This commit is contained in:
@@ -38,7 +38,7 @@ class RoleResolverTest extends TestCase
|
||||
): void {
|
||||
$this->domainService->expects($this->exactly($expectedDomainCalls))->method('getOrCreate')->with(
|
||||
'example.com',
|
||||
)->willReturn(Domain::withAuthority('example.com')->setId('1'));
|
||||
)->willReturn($this->domainWithId(Domain::withAuthority('example.com')));
|
||||
|
||||
$result = $this->resolver->determineRoles($input);
|
||||
|
||||
@@ -47,7 +47,7 @@ class RoleResolverTest extends TestCase
|
||||
|
||||
public function provideRoles(): iterable
|
||||
{
|
||||
$domain = Domain::withAuthority('example.com')->setId('1');
|
||||
$domain = $this->domainWithId(Domain::withAuthority('example.com'));
|
||||
$buildInput = function (array $definition): InputInterface {
|
||||
$input = $this->createStub(InputInterface::class);
|
||||
$input->method('getOption')->willReturnMap(
|
||||
@@ -113,4 +113,10 @@ class RoleResolverTest extends TestCase
|
||||
|
||||
$this->resolver->determineRoles($input);
|
||||
}
|
||||
|
||||
private function domainWithId(Domain $domain): Domain
|
||||
{
|
||||
$domain->setId('1');
|
||||
return $domain;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user