Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use a Database_Expression to handle the MAX() function.
  • Loading branch information
bharat committed Dec 23, 2009
1 parent bdd7c68 commit 71e154b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/gallery/tests/Gallery_Installer_Test.php
Expand Up @@ -35,7 +35,7 @@ public function install_registers_gallery_module_test() {

public function install_creates_root_item_test() {
$max_right_ptr = ORM::factory("item")
->select("MAX(`right_ptr`) AS `right_ptr`")
->select(new Database_Expression("MAX(`right_ptr`) AS `right_ptr`"))
->find()->right_ptr;
$root = ORM::factory('item')->find(1);
$this->assert_equal("Gallery", $root->title);
Expand Down

0 comments on commit 71e154b

Please sign in to comment.