Skip to content

Commit

Permalink
Allow int for entity ID under test for edit and delete actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dragosprotung committed Mar 19, 2024
1 parent 500d3a5 commit 2880592
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Test/Controller/DeleteActionTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
abstract class DeleteActionTestCase extends AdminControllerWebTestCase
{
protected static string $expectedEntityIdUnderTest;
protected static string|int $expectedEntityIdUnderTest;

/**
* @param array<array-key, mixed> $queryParameters
Expand Down Expand Up @@ -51,7 +51,7 @@ private function findForm(Crawler $crawler): Form
return $crawler->filter($this->mainContentSelector() . ' form#delete-form')->form();
}

protected function entityIdUnderTest(): string
protected function entityIdUnderTest(): string|int
{
$rp = new ReflectionProperty($this, 'expectedEntityIdUnderTest');
if (! $rp->isInitialized()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Test/Controller/EditActionTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
abstract class EditActionTestCase extends AdminControllerWebTestCase
{
protected static string $expectedEntityIdUnderTest;
protected static string|int $expectedEntityIdUnderTest;

protected static string|null $expectedPageTitle = null;

Expand All @@ -49,7 +49,7 @@ protected function expectedPageTitle(): string|null
return static::$expectedPageTitle;
}

protected function entityIdUnderTest(): string
protected function entityIdUnderTest(): string|int
{
$rp = new ReflectionProperty($this, 'expectedEntityIdUnderTest');
if (! $rp->isInitialized()) {
Expand Down

0 comments on commit 2880592

Please sign in to comment.