1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests/QueryUpdateTestCase.php

18 lines
574 B
PHP

<?php
class Doctrine_Query_Update_TestCase extends Doctrine_UnitTestCase {
public function testUpdateAllWithColumnAggregationInheritance() {
$q = new Doctrine_Query();
$q->parseQuery("UPDATE User u SET u.name = 'someone'");
$this->assertEqual($q->getQuery(), "UPDATE entity SET e.name = 'someone' WHERE (e.type = 0)");
$q = new Doctrine_Query();
$q->update('User u')->set('u.name', 'someone');
$this->assertEqual($q->getQuery(), "UPDATE entity SET e.name = 'someone' WHERE (e.type = 0)");
}
}
?>