diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2024-09-16 11:08:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 11:08:35 +0200 |
commit | 8a328816333496a6ca507782d2b3b47bee470ba2 (patch) | |
tree | 76ee2d5afd60fc45cdb77b68ef416667b69a45a9 /tests/lib | |
parent | 1a972d0f47ffaf688ee60781b2d6b1d1740ea4d1 (diff) | |
parent | 247b1dd70e4518012bf4a55dea56a349886b7b38 (diff) | |
download | nextcloud-server-8a328816333496a6ca507782d2b3b47bee470ba2.tar.gz nextcloud-server-8a328816333496a6ca507782d2b3b47bee470ba2.zip |
Merge pull request #48008 from nextcloud/fix/entity/strict-types
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/AppFramework/Db/EntityTest.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php index c426faa757d..8e6e6dcd645 100644 --- a/tests/lib/AppFramework/Db/EntityTest.php +++ b/tests/lib/AppFramework/Db/EntityTest.php @@ -27,7 +27,6 @@ use PHPUnit\Framework\Constraint\IsType; * @method void setTrueOrFalse(bool $trueOrFalse) * @method bool getAnotherBool() * @method bool isAnotherBool() - * @method void setAnotherBool(bool $anotherBool) * @method string getLongText() * @method void setLongText(string $longText) */ @@ -47,6 +46,10 @@ class TestEntity extends Entity { $this->addType('longText', 'blob'); $this->name = $name; } + + public function setAnotherBool(bool $anotherBool): void { + parent::setAnotherBool($anotherBool); + } } @@ -71,12 +74,14 @@ class EntityTest extends \Test\TestCase { public function testFromRow(): void { $row = [ 'pre_name' => 'john', - 'email' => 'john@something.com' + 'email' => 'john@something.com', + 'another_bool' => 1, ]; $this->entity = TestEntity::fromRow($row); $this->assertEquals($row['pre_name'], $this->entity->getPreName()); $this->assertEquals($row['email'], $this->entity->getEmail()); + $this->assertEquals($row['another_bool'], $this->entity->getAnotherBool()); } |