aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-15 13:40:16 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-09-16 13:52:18 +0000
commitbbb867f5412320b0e84666f857e85e58bdf9b8ba (patch)
tree47f2e57c3a5eedeb4ea9a01745e585bc58f68f91 /tests
parent440d8ea4b30111f65bc01274d50ad28f87091b78 (diff)
downloadnextcloud-server-bbb867f5412320b0e84666f857e85e58bdf9b8ba.tar.gz
nextcloud-server-bbb867f5412320b0e84666f857e85e58bdf9b8ba.zip
fix(Entity): Fix magic setter call for custom strong typed settersbackport/48008/stable29
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AppFramework/Db/EntityTest.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php
index d76a8ccfe06..d7e4c30375b 100644
--- a/tests/lib/AppFramework/Db/EntityTest.php
+++ b/tests/lib/AppFramework/Db/EntityTest.php
@@ -42,7 +42,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)
*/
@@ -62,6 +61,10 @@ class TestEntity extends Entity {
$this->addType('longText', 'blob');
$this->name = $name;
}
+
+ public function setAnotherBool(bool $anotherBool): void {
+ parent::setAnotherBool($anotherBool);
+ }
}
@@ -86,12 +89,14 @@ class EntityTest extends \Test\TestCase {
public function testFromRow() {
$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());
}