Skip to content

Commit 8dd419e

Browse files
authored
Merge pull request #1832 from tarlepp/chore(test)/testdox-fixes
Chore(test) - Added missing dataproviders
2 parents 84237a9 + e1ae533 commit 8dd419e

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

tests/Integration/Entity/ApiKeyTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ public function testThatApiKeyHasExpectedRoles(
4545
StringableArrayObject $expectedRoles,
4646
StringableArrayObject $criteria
4747
): void {
48-
$apiKey = self::getContainer()->get(ApiKeyRepository::class)->findOneBy($criteria->getArrayCopy());
48+
static::bootKernel();
49+
50+
$apiKey = static::getContainer()->get(ApiKeyRepository::class)->findOneBy($criteria->getArrayCopy());
4951

5052
self::assertInstanceOf(ApiKey::class, $apiKey);
5153
self::assertSame($expectedRoles->getArrayCopy(), $apiKey->getRoles());
@@ -57,7 +59,7 @@ public function testThatApiKeyHasExpectedRoles(
5759
*/
5860
public function dataProviderTestThatApiKeyHasExpectedRoles(): Generator
5961
{
60-
$rolesService = self::getContainer()->get(RolesService::class);
62+
$rolesService = static::getContainer()->get(RolesService::class);
6163

6264
foreach ($rolesService->getRoles() as $role) {
6365
yield [

tests/Integration/Entity/DateDimensionTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class DateDimensionTest extends EntityTestCase
3232

3333
/** @noinspection PhpMissingParentCallCommonInspection */
3434
/**
35+
* @dataProvider dataProviderTestThatSetterAndGettersWorks
36+
*
3537
* @testdox No setter for `$property` property in read only entity - so cannot test this
3638
*/
3739
public function testThatSetterOnlyAcceptSpecifiedType(
@@ -44,6 +46,8 @@ public function testThatSetterOnlyAcceptSpecifiedType(
4446

4547
/** @noinspection PhpMissingParentCallCommonInspection */
4648
/**
49+
* @dataProvider dataProviderTestThatSetterAndGettersWorks
50+
*
4751
* @testdox No setter for `$property` property in read only entity - so cannot test this
4852
*/
4953
public function testThatSetterReturnsInstanceOfEntity(

tests/Integration/Entity/LogLoginFailureTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class LogLoginFailureTest extends EntityTestCase
3232

3333
/** @noinspection PhpMissingParentCallCommonInspection */
3434
/**
35+
* @dataProvider dataProviderTestThatSetterAndGettersWorks
36+
*
3537
* @testdox No setter for `$property` property in read only entity - so cannot test this
3638
*/
3739
public function testThatSetterOnlyAcceptSpecifiedType(
@@ -44,6 +46,8 @@ public function testThatSetterOnlyAcceptSpecifiedType(
4446

4547
/** @noinspection PhpMissingParentCallCommonInspection */
4648
/**
49+
* @dataProvider dataProviderTestThatSetterAndGettersWorks
50+
*
4751
* @testdox No setter for `$property` property in read only entity - so cannot test this
4852
*/
4953
public function testThatSetterReturnsInstanceOfEntity(

tests/Integration/Entity/LogLoginTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ class LogLoginTest extends EntityTestCase
3636

3737
/** @noinspection PhpMissingParentCallCommonInspection */
3838
/**
39+
* @dataProvider dataProviderTestThatSetterAndGettersWorks
40+
*
3941
* @testdox No setter for `$property` property in read only entity - so cannot test this
4042
*/
4143
public function testThatSetterOnlyAcceptSpecifiedType(
@@ -48,6 +50,8 @@ public function testThatSetterOnlyAcceptSpecifiedType(
4850

4951
/** @noinspection PhpMissingParentCallCommonInspection */
5052
/**
53+
* @dataProvider dataProviderTestThatSetterAndGettersWorks
54+
*
5155
* @testdox No setter for `$property` property in read only entity - so cannot test this
5256
*/
5357
public function testThatSetterReturnsInstanceOfEntity(

tests/Integration/Entity/LogRequestTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class LogRequestTest extends EntityTestCase
4343

4444
/** @noinspection PhpMissingParentCallCommonInspection */
4545
/**
46+
* @dataProvider dataProviderTestThatSetterAndGettersWorks
47+
*
4648
* @testdox No setter for `$property` property in read only entity - so cannot test this
4749
*/
4850
public function testThatSetterOnlyAcceptSpecifiedType(
@@ -55,6 +57,8 @@ public function testThatSetterOnlyAcceptSpecifiedType(
5557

5658
/** @noinspection PhpMissingParentCallCommonInspection */
5759
/**
60+
* @dataProvider dataProviderTestThatSetterAndGettersWorks
61+
*
5862
* @testdox No setter for `$property` property in read only entity - so cannot test this
5963
*/
6064
public function testThatSetterReturnsInstanceOfEntity(

0 commit comments

Comments
 (0)