Fix invalid test
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
50123a39ac
commit
b39fa91f40
@ -14109,12 +14109,6 @@ parameters:
|
||||
count: 2
|
||||
path: src/Plugins/Export/Helpers/Pdf.php
|
||||
|
||||
-
|
||||
message: '#^Cannot cast mixed to string\.$#'
|
||||
identifier: cast.string
|
||||
count: 6
|
||||
path: src/Plugins/Export/Helpers/TableProperty.php
|
||||
|
||||
-
|
||||
message: '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\.$#'
|
||||
identifier: foreach.nonIterable
|
||||
|
||||
@ -50,7 +50,7 @@ class TableProperty
|
||||
*/
|
||||
public string $ext;
|
||||
|
||||
/** @param mixed[] $row table row */
|
||||
/** @param list<string|null> $row table row */
|
||||
public function __construct(array $row)
|
||||
{
|
||||
$this->name = trim((string) $row[0]);
|
||||
|
||||
@ -21,7 +21,7 @@ class TablePropertyTest extends AbstractTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$row = [' name ', 'int ', true, ' PRI', '0', 'mysql'];
|
||||
$row = [' name ', 'int ', 'YES', ' PRI', '0', 'mysql'];
|
||||
$this->object = new TableProperty($row);
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ class TablePropertyTest extends AbstractTestCase
|
||||
|
||||
self::assertSame('int', $this->object->type);
|
||||
|
||||
self::assertEquals(1, $this->object->nullable);
|
||||
self::assertEquals('YES', $this->object->nullable);
|
||||
|
||||
self::assertSame('PRI', $this->object->key);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user