cvs: pearweb /tests/category/update test_basic.phpt

From: Date: Tue, 25 Mar 2008 02:54:59 +0000
Subject: cvs: pearweb /tests/category/update test_basic.phpt
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-7386@lists.php.net to get a copy of this message
dufuz Tue Mar 25 02:54:59 2008 UTC Modified files: /pearweb/tests/category/update test_basic.phpt Log: Update tests to match sql in reality http://cvs.php.net/viewvc.cgi/pearweb/tests/category/update/test_basic.phpt?r1=1.6&r2=1.7&diff_format=u Index: pearweb/tests/category/update/test_basic.phpt diff -u pearweb/tests/category/update/test_basic.phpt:1.6 pearweb/tests/category/update/test_basic.phpt:1.7 --- pearweb/tests/category/update/test_basic.phpt:1.6 Wed Feb 6 01:01:06 2008 +++ pearweb/tests/category/update/test_basic.phpt Tue Mar 25 02:54:59 2008 @@ -109,12 +109,12 @@ $pear_rest->savePackageREST('Blah2'); // to make sure old files are deleted -$mock->addInsertQuery("INSERT INTO categories (id, name, description, parent)VALUES (1, 'test', 'none', NULL)", array(), array()); -$mock->addDataQuery("select max(cat_right) + 1 from categories - where parent is null", array(array('m' => 1)), array('m')); -$mock->addUpdateQuery("update categories - set cat_left = 1, cat_right = 2 - where id = 1", array(), array()); +$mock->addInsertQuery("INSERT INTO categories (id, name, description, parent) VALUES (1, 'test', 'none', NULL)", array(), array()); +$mock->addDataQuery("SELECT max(cat_right) + 1 FROM categories + WHERE parent IS NULL", array(array('m' => 1)), array('m')); +$mock->addUpdateQuery("UPDATE categories + SET cat_left = 1, cat_right = 2 + WHERE id = 1", array(), array()); $mock->addDataQuery("SELECT * FROM categories WHERE name = 'test'", array( array('id' => 1, 'parent' => 0, 'name' => 'test', 'summary' => 'hi', 'description' => 'old desc', 'npackages' => 0, 'pkg_left' => 0, 'pkg_right' => 0, 'cat_left' => 0, 'cat_right' => 0)

« previous php.pear.core (#7386) next »