-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48008 from nextcloud/fix/entity/strict-types
- Loading branch information
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ | |
* @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 @@ public function __construct($name = null) { | |
$this->addType('longText', 'blob'); | ||
$this->name = $name; | ||
} | ||
|
||
public function setAnotherBool(bool $anotherBool): void { | ||
parent::setAnotherBool($anotherBool); | ||
} | ||
} | ||
|
||
|
||
|
@@ -71,12 +74,14 @@ public function testResetUpdatedFields(): void { | |
public function testFromRow(): void { | ||
$row = [ | ||
'pre_name' => 'john', | ||
'email' => '[email protected]' | ||
'email' => '[email protected]', | ||
'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()); | ||
} | ||
|
||
|
||
|