| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 17 | public function testItDefinition(): void |
||
| 18 | { |
||
| 19 | $schemaAttribute = new SchemaAttribute('foo', 'string', [ |
||
| 20 | 'min' => 10, |
||
| 21 | 'max' => 100, |
||
| 22 | ]); |
||
| 23 | |||
| 24 | $column = new Column($schemaAttribute); |
||
| 25 | |||
| 26 | $this->assertEquals($schemaAttribute->name(), $column->getName()); |
||
| 27 | $this->assertEquals($schemaAttribute->dataType(), $column->getType()); |
||
| 28 | $this->assertEquals([ |
||
| 29 | 'length' => $schemaAttribute->maxLength(), |
||
| 30 | 'notnull' => $schemaAttribute->isRequired(), |
||
| 31 | 'comment' => $schemaAttribute->name(), |
||
| 32 | ], $column->getOptions()); |
||
| 33 | } |
||
| 35 |