diff --git a/tests/Query/Mysql/DateTest.php b/tests/Query/Mysql/DateTest.php index a2c54f3b..82f252be 100644 --- a/tests/Query/Mysql/DateTest.php +++ b/tests/Query/Mysql/DateTest.php @@ -2,6 +2,8 @@ namespace DoctrineExtensions\Tests\Query\Mysql; +use Doctrine\ORM\Version; + class DateTest extends \DoctrineExtensions\Tests\Query\MysqlTestCase { public function testDateDiff() @@ -24,6 +26,10 @@ public function testDateAdd() public function testDateAddWithColumnAlias() { + if(Version::VERSION < 2.2) { + $this->markTestSkipped('Alias is not supported in Doctrine 2.1 and lower'); + } + $dql = "SELECT p.created as alternative FROM DoctrineExtensions\Tests\Entities\Date p HAVING DATEADD(alternative, 4, 'MONTH') < 7"; $q = $this->entityManager->createQuery($dql); $sql = "SELECT d0_.created AS created_0 FROM Date d0_ HAVING DATE_ADD(created_0, INTERVAL 4 MONTH) < 7";