Vendor update && Started using DoctrineMigrations
This commit is contained in:
		
							
								
								
									
										33
									
								
								vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Events/MysqlSessionInitTest.php
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Events/MysqlSessionInitTest.php
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace Doctrine\Tests\DBAL\Events;
 | 
			
		||||
 | 
			
		||||
use Doctrine\Tests\DbalTestCase;
 | 
			
		||||
use Doctrine\DBAL\Event\Listeners\MysqlSessionInit;
 | 
			
		||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
 | 
			
		||||
use Doctrine\DBAL\Events;
 | 
			
		||||
 | 
			
		||||
require_once __DIR__ . '/../../TestInit.php';
 | 
			
		||||
 | 
			
		||||
class MysqlSessionInitTest extends DbalTestCase
 | 
			
		||||
{
 | 
			
		||||
    public function testPostConnect()
 | 
			
		||||
    {
 | 
			
		||||
        $connectionMock = $this->getMock('Doctrine\DBAL\Connection', array(), array(), '', false);
 | 
			
		||||
        $connectionMock->expects($this->once())
 | 
			
		||||
                       ->method('executeUpdate')
 | 
			
		||||
                       ->with($this->equalTo("SET NAMES foo COLLATE bar"));
 | 
			
		||||
 | 
			
		||||
        $eventArgs = new ConnectionEventArgs($connectionMock);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        $listener = new MysqlSessionInit('foo', 'bar');
 | 
			
		||||
        $listener->postConnect($eventArgs);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testGetSubscribedEvents()
 | 
			
		||||
    {
 | 
			
		||||
        $listener = new MysqlSessionInit();
 | 
			
		||||
        $this->assertEquals(array(Events::postConnect), $listener->getSubscribedEvents());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										33
									
								
								vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Events/OracleSessionInitTest.php
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Events/OracleSessionInitTest.php
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace Doctrine\Tests\DBAL\Events;
 | 
			
		||||
 | 
			
		||||
use Doctrine\Tests\DbalTestCase;
 | 
			
		||||
use Doctrine\DBAL\Event\Listeners\OracleSessionInit;
 | 
			
		||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
 | 
			
		||||
use Doctrine\DBAL\Events;
 | 
			
		||||
 | 
			
		||||
require_once __DIR__ . '/../../TestInit.php';
 | 
			
		||||
 | 
			
		||||
class OracleSessionInitTest extends DbalTestCase
 | 
			
		||||
{
 | 
			
		||||
    public function testPostConnect()
 | 
			
		||||
    {
 | 
			
		||||
        $connectionMock = $this->getMock('Doctrine\DBAL\Connection', array(), array(), '', false);
 | 
			
		||||
        $connectionMock->expects($this->once())
 | 
			
		||||
                       ->method('executeUpdate')
 | 
			
		||||
                       ->with($this->isType('string'));
 | 
			
		||||
 | 
			
		||||
        $eventArgs = new ConnectionEventArgs($connectionMock);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        $listener = new OracleSessionInit();
 | 
			
		||||
        $listener->postConnect($eventArgs);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testGetSubscribedEvents()
 | 
			
		||||
    {
 | 
			
		||||
        $listener = new OracleSessionInit();
 | 
			
		||||
        $this->assertEquals(array(Events::postConnect), $listener->getSubscribedEvents());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										35
									
								
								vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Events/SQLSessionInitTest.php
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Events/SQLSessionInitTest.php
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace Doctrine\Tests\DBAL\Events;
 | 
			
		||||
 | 
			
		||||
use Doctrine\Tests\DbalTestCase;
 | 
			
		||||
use Doctrine\DBAL\Event\Listeners\SQLSessionInit;
 | 
			
		||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
 | 
			
		||||
use Doctrine\DBAL\Events;
 | 
			
		||||
 | 
			
		||||
require_once __DIR__ . '/../../TestInit.php';
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @group DBAL-169
 | 
			
		||||
 */
 | 
			
		||||
class SQLSessionInitTest extends DbalTestCase
 | 
			
		||||
{
 | 
			
		||||
    public function testPostConnect()
 | 
			
		||||
    {
 | 
			
		||||
        $connectionMock = $this->getMock('Doctrine\DBAL\Connection', array(), array(), '', false);
 | 
			
		||||
        $connectionMock->expects($this->once())
 | 
			
		||||
                       ->method('exec')
 | 
			
		||||
                       ->with($this->equalTo("SET SEARCH_PATH TO foo, public, TIMEZONE TO 'Europe/Berlin'"));
 | 
			
		||||
 | 
			
		||||
        $eventArgs = new ConnectionEventArgs($connectionMock);
 | 
			
		||||
 | 
			
		||||
        $listener = new SQLSessionInit("SET SEARCH_PATH TO foo, public, TIMEZONE TO 'Europe/Berlin'");
 | 
			
		||||
        $listener->postConnect($eventArgs);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testGetSubscribedEvents()
 | 
			
		||||
    {
 | 
			
		||||
        $listener = new SQLSessionInit("SET SEARCH_PATH TO foo, public, TIMEZONE TO 'Europe/Berlin'");
 | 
			
		||||
        $this->assertEquals(array(Events::postConnect), $listener->getSubscribedEvents());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user