Code Duplication    Length = 9-15 lines in 2 locations

tests/Doctrine/Tests/DBAL/DBALExceptionTest.php 1 location

@@ 46-60 (lines=15) @@
43
        self::assertSame($ex, $e);
44
    }
45
46
    public function testDriverRequiredWithUrl()
47
    {
48
        $url = 'mysql://localhost';
49
        $exception = DBALException::driverRequired($url);
50
51
        self::assertInstanceOf(DBALException::class, $exception);
52
        self::assertSame(
53
            sprintf(
54
                "The options 'driver' or 'driverClass' are mandatory if a connection URL without scheme " .
55
                'is given to DriverManager::getConnection(). Given URL: %s',
56
                $url
57
            ),
58
            $exception->getMessage()
59
        );
60
    }
61
62
    /**
63
     * @group #2821

tests/Doctrine/Tests/DBAL/Types/ConversionExceptionTest.php 1 location

@@ 42-50 (lines=9) @@
39
        );
40
    }
41
42
    public function testConversionFailedFormatPreservesPreviousException()
43
    {
44
        $previous = new \Exception();
45
46
        $exception = ConversionException::conversionFailedFormat('foo', 'bar', 'baz', $previous);
47
48
        self::assertInstanceOf('Doctrine\DBAL\Types\ConversionException', $exception);
49
        self::assertSame($previous, $exception->getPrevious());
50
    }
51
52
    /**
53
     * @return mixed[][]