cvs: pearweb /tests/category/delete test_basic.phpt
| From: | Helgi �ormar �orbj�rnsson | Date: | Tue, 25 Mar 2008 02:55:05 +0000 |
| Subject: | cvs: pearweb /tests/category/delete test_basic.phpt | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-7389@lists.php.net to get a copy of this message | ||
dufuz Tue Mar 25 02:55:05 2008 UTC
Modified files:
/pearweb/tests/category/delete test_basic.phpt
Log:
Update tests to match sql in reality
http://cvs.php.net/viewvc.cgi/pearweb/tests/category/delete/test_basic.phpt?r1=1.4&r2=1.5&diff_format=u
Index: pearweb/tests/category/delete/test_basic.phpt
diff -u pearweb/tests/category/delete/test_basic.phpt:1.4
pearweb/tests/category/delete/test_basic.phpt:1.5
--- pearweb/tests/category/delete/test_basic.phpt:1.4 Fri Jun 8 15:22:45 2007
+++ pearweb/tests/category/delete/test_basic.phpt Tue Mar 25 02:55:05 2008
@@ -4,13 +4,13 @@
<?php
// setup
require dirname(dirname(__FILE__)) . '/setup.php.inc';
-$mock->addInsertQuery("INSERT INTO categories (id, name, description, parent)VALUES (1,
'test', 'hi there', NULL)", array(), 1);
-$mock->addDataQuery("select max(cat_right) + 1 from categories
- where parent is null", array(
+$mock->addInsertQuery("INSERT INTO categories (id, name, description, parent) VALUES (1,
'test', 'hi there', NULL)", array(), 1);
+$mock->addDataQuery("SELECT max(cat_right) + 1 FROM categories
+ WHERE parent IS NULL", array(
array('max(cat_right) + 1' => '1')), array('max(cat_right) +
1'));
-$mock->addUpdateQuery("update categories
- set cat_left = 1, cat_right = 2
- where id = 1", array(), 1);
+$mock->addUpdateQuery("UPDATE categories
+ SET cat_left = 1, cat_right = 2
+ WHERE id = 1", array(), 1);
$mock->addDataQuery("SELECT * FROM categories WHERE name = 'test'",
array(array('id' => 1,
'parent' => null,
@@ -45,7 +45,7 @@
WHERE
p.category = c.id AND
c.name = 'test'", array(
- ), array('id', 'name'));
+ ), array('id', 'name'));
$id = category::add(array('name' => 'test', 'desc' => 'hi
there'));
$phpt->assertFileExists($restdir . '/c/test/info.xml', 'info.xml');
$phpt->assertFileExists($restdir . '/c/test/packages.xml', 'packages.xml');