| @@ 145-152 (lines=8) @@ | ||
| 142 | /** |
|
| 143 | * @test |
|
| 144 | */ |
|
| 145 | public function convertToPHPValueWithNullReturnsNull() |
|
| 146 | { |
|
| 147 | PhpEnumType::registerEnumType(Action::class); |
|
| 148 | $type = Type::getType(Action::class); |
|
| 149 | ||
| 150 | $value = $type->convertToPHPValue(null, $this->platform->reveal()); |
|
| 151 | $this->assertNull($value); |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * @test |
|
| @@ 174-181 (lines=8) @@ | ||
| 171 | /** |
|
| 172 | * @test |
|
| 173 | */ |
|
| 174 | public function usingChildEnumTypeRegisteredValueIsCorrect() |
|
| 175 | { |
|
| 176 | MyType::registerEnumType(Action::class); |
|
| 177 | $type = Type::getType(Action::class); |
|
| 178 | ||
| 179 | $this->assertInstanceOf(MyType::class, $type); |
|
| 180 | $this->assertEquals('FOO BAR', $type->getSQLDeclaration([], $this->platform->reveal())); |
|
| 181 | } |
|
| 182 | } |
|
| 183 | ||