isSingleFloatLiteral()); self::assertTrue($union->hasLiteralFloat()); self::assertSame($literalFloat, $union->getSingleFloatLiteral()); } public function testWillThrowInvalidArgumentExceptionWhenSingleFloatLiteralIsRequestedButNoneExists(): void { $this->expectException(InvalidArgumentException::class); $union = new Union([new TFloat()]); $union->getSingleFloatLiteral(); } }