Skip to content

Commit

Permalink
Merge pull request #1832 from tarlepp/chore(test)/testdox-fixes
Browse files Browse the repository at this point in the history
Chore(test) - Added missing dataproviders
  • Loading branch information
tarlepp committed May 29, 2022
2 parents 84237a9 + e1ae533 commit 8dd419e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/Integration/Entity/ApiKeyTest.php
Expand Up @@ -45,7 +45,9 @@ public function testThatApiKeyHasExpectedRoles(
StringableArrayObject $expectedRoles,
StringableArrayObject $criteria
): void {
$apiKey = self::getContainer()->get(ApiKeyRepository::class)->findOneBy($criteria->getArrayCopy());
static::bootKernel();

$apiKey = static::getContainer()->get(ApiKeyRepository::class)->findOneBy($criteria->getArrayCopy());

self::assertInstanceOf(ApiKey::class, $apiKey);
self::assertSame($expectedRoles->getArrayCopy(), $apiKey->getRoles());
Expand All @@ -57,7 +59,7 @@ public function testThatApiKeyHasExpectedRoles(
*/
public function dataProviderTestThatApiKeyHasExpectedRoles(): Generator
{
$rolesService = self::getContainer()->get(RolesService::class);
$rolesService = static::getContainer()->get(RolesService::class);

foreach ($rolesService->getRoles() as $role) {
yield [
Expand Down
4 changes: 4 additions & 0 deletions tests/Integration/Entity/DateDimensionTest.php
Expand Up @@ -32,6 +32,8 @@ class DateDimensionTest extends EntityTestCase

/** @noinspection PhpMissingParentCallCommonInspection */
/**
* @dataProvider dataProviderTestThatSetterAndGettersWorks
*
* @testdox No setter for `$property` property in read only entity - so cannot test this
*/
public function testThatSetterOnlyAcceptSpecifiedType(
Expand All @@ -44,6 +46,8 @@ public function testThatSetterOnlyAcceptSpecifiedType(

/** @noinspection PhpMissingParentCallCommonInspection */
/**
* @dataProvider dataProviderTestThatSetterAndGettersWorks
*
* @testdox No setter for `$property` property in read only entity - so cannot test this
*/
public function testThatSetterReturnsInstanceOfEntity(
Expand Down
4 changes: 4 additions & 0 deletions tests/Integration/Entity/LogLoginFailureTest.php
Expand Up @@ -32,6 +32,8 @@ class LogLoginFailureTest extends EntityTestCase

/** @noinspection PhpMissingParentCallCommonInspection */
/**
* @dataProvider dataProviderTestThatSetterAndGettersWorks
*
* @testdox No setter for `$property` property in read only entity - so cannot test this
*/
public function testThatSetterOnlyAcceptSpecifiedType(
Expand All @@ -44,6 +46,8 @@ public function testThatSetterOnlyAcceptSpecifiedType(

/** @noinspection PhpMissingParentCallCommonInspection */
/**
* @dataProvider dataProviderTestThatSetterAndGettersWorks
*
* @testdox No setter for `$property` property in read only entity - so cannot test this
*/
public function testThatSetterReturnsInstanceOfEntity(
Expand Down
4 changes: 4 additions & 0 deletions tests/Integration/Entity/LogLoginTest.php
Expand Up @@ -36,6 +36,8 @@ class LogLoginTest extends EntityTestCase

/** @noinspection PhpMissingParentCallCommonInspection */
/**
* @dataProvider dataProviderTestThatSetterAndGettersWorks
*
* @testdox No setter for `$property` property in read only entity - so cannot test this
*/
public function testThatSetterOnlyAcceptSpecifiedType(
Expand All @@ -48,6 +50,8 @@ public function testThatSetterOnlyAcceptSpecifiedType(

/** @noinspection PhpMissingParentCallCommonInspection */
/**
* @dataProvider dataProviderTestThatSetterAndGettersWorks
*
* @testdox No setter for `$property` property in read only entity - so cannot test this
*/
public function testThatSetterReturnsInstanceOfEntity(
Expand Down
4 changes: 4 additions & 0 deletions tests/Integration/Entity/LogRequestTest.php
Expand Up @@ -43,6 +43,8 @@ class LogRequestTest extends EntityTestCase

/** @noinspection PhpMissingParentCallCommonInspection */
/**
* @dataProvider dataProviderTestThatSetterAndGettersWorks
*
* @testdox No setter for `$property` property in read only entity - so cannot test this
*/
public function testThatSetterOnlyAcceptSpecifiedType(
Expand All @@ -55,6 +57,8 @@ public function testThatSetterOnlyAcceptSpecifiedType(

/** @noinspection PhpMissingParentCallCommonInspection */
/**
* @dataProvider dataProviderTestThatSetterAndGettersWorks
*
* @testdox No setter for `$property` property in read only entity - so cannot test this
*/
public function testThatSetterReturnsInstanceOfEntity(
Expand Down

0 comments on commit 8dd419e

Please sign in to comment.