Merge branch '5.1'
* 5.1: fix compatibility with Doctrine DBAL 3.0 skip test if guesser is not supported Added missing license headers
This commit is contained in:
commit
6aecad7438
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Messenger\Bridge\Doctrine\Tests\Transport;
|
||||
|
||||
use Doctrine\DBAL\Driver\PDO\Exception;
|
||||
use Doctrine\DBAL\Driver\PDOException;
|
||||
use Doctrine\DBAL\Exception\DeadlockException;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@ -75,7 +76,7 @@ class DoctrineReceiverTest extends TestCase
|
||||
{
|
||||
$serializer = $this->createSerializer();
|
||||
$connection = $this->createMock(Connection::class);
|
||||
$driverException = new PDOException(new \PDOException('Deadlock', 40001));
|
||||
$driverException = class_exists(Exception::class) ? Exception::new(new \PDOException('Deadlock', 40001)) : new PDOException(new \PDOException('Deadlock', 40001));
|
||||
$connection->method('get')->willThrowException(new DeadlockException('Deadlock', $driverException));
|
||||
$receiver = new DoctrineReceiver($connection, $serializer);
|
||||
$this->assertSame([], $receiver->get());
|
||||
|
@ -81,6 +81,10 @@ abstract class AbstractMimeTypeGuesserTest extends TestCase
|
||||
|
||||
public function testGuessWithDuplicatedFileType()
|
||||
{
|
||||
if (!$this->getGuesser()->isGuesserSupported()) {
|
||||
$this->markTestSkipped('Guesser is not supported');
|
||||
}
|
||||
|
||||
$this->assertEquals('application/vnd.openxmlformats-officedocument.wordprocessingml.document', $this->getGuesser()->guessMimeType(__DIR__.'/Fixtures/test.docx'));
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Security\Http\Event;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Security\Http\Event;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
Reference in New Issue
Block a user