DbalSessionHandlerTest.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Bridge\Doctrine\Tests\HttpFoundation;
  11. use Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionHandler;
  12. /**
  13. * Test class for DbalSessionHandler.
  14. *
  15. * @author Drak <drak@zikula.org>
  16. */
  17. class DbalSessionHandlerTest extends \PHPUnit_Framework_TestCase
  18. {
  19. protected function setUp()
  20. {
  21. if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
  22. $this->markTestSkipped('The "HttpFoundation" component is not available');
  23. }
  24. }
  25. public function testConstruct()
  26. {
  27. $this->connection = $this->getMock('Doctrine\DBAL\Driver\Connection');
  28. $mock = $this->getMockBuilder('Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionHandler');
  29. $mock->setConstructorArgs(array($this->connection));
  30. $this->driver = $mock->getMock();
  31. }
  32. }