Trigger tests fail

webchick - May 20, 2008 - 05:08
Project:Drupal
Version:7.x-dev
Component:tests
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

363 passes, 5 fails and 10 exceptions.

Check to make sure the unpublish post action can be unassigned from the trigger. at [/Applications/MAMP/htdocs/head/modules/trigger/trigger.test line 65] [Other] Fail
Check to make sure the make post sticky action can be unassigned from the trigger. at [/Applications/MAMP/htdocs/head/modules/trigger/trigger.test line 65] [Other] Fail
Check to make sure the make post unsticky action can be unassigned from the trigger. at [/Applications/MAMP/htdocs/head/modules/trigger/trigger.test line 65] [Other] Fail
Check to make sure the promote post to front page action can be unassigned from the trigger. at [/Applications/MAMP/htdocs/head/modules/trigger/trigger.test line 65] [Other] Fail
Check to make sure the remove post from front page action can be unassigned from the trigger. at [/Applications/MAMP/htdocs/head/modules/trigger/trigger.test line 65] [Other] Fail
Unexpected PHP error [Table 'head.simpletest512127watchdog' doesn't exist query: INSERT INTO simpletest512127watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'actions', 'Action \'%%action\' added.', 'a:1:{s:7:\"%%action\";s:17:\"Unpublish comment\";}', 5, '', 'http://localhost/head/admin/build/testing', 'http://localhost/head/admin/build/testing', '::1', 1211259942)] severity [E_USER_WARNING] in [/Applications/MAMP/htdocs/head/includes/database.mysqli.inc line 130] [PHP] Exception
Unexpected PHP error [Table 'head.simpletest512127watchdog' doesn't exist query: INSERT INTO simpletest512127watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'actions', 'Action \'%%action\' added.', 'a:1:{s:7:\"%%action\";s:12:\"Publish post\";}', 5, '', 'http://localhost/head/admin/build/testing', 'http://localhost/head/admin/build/testing', '::1', 1211259942)] severity [E_USER_WARNING] in [/Applications/MAMP/htdocs/head/includes/database.mysqli.inc line 130] [PHP] Exception
Unexpected PHP error [Table 'head.simpletest512127watchdog' doesn't exist query: INSERT INTO simpletest512127watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'actions', 'Action \'%%action\' added.', 'a:1:{s:7:\"%%action\";s:14:\"Unpublish post\";}', 5, '', 'http://localhost/head/admin/build/testing', 'http://localhost/head/admin/build/testing', '::1', 1211259942)] severity [E_USER_WARNING] in [/Applications/MAMP/htdocs/head/includes/database.mysqli.inc line 130] [PHP] Exception
Unexpected PHP error [Table 'head.simpletest512127watchdog' doesn't exist query: INSERT INTO simpletest512127watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'actions', 'Action \'%%action\' added.', 'a:1:{s:7:\"%%action\";s:16:\"Make post sticky\";}', 5, '', 'http://localhost/head/admin/build/testing', 'http://localhost/head/admin/build/testing', '::1', 1211259942)] severity [E_USER_WARNING] in [/Applications/MAMP/htdocs/head/includes/database.mysqli.inc line 130] [PHP] Exception
Unexpected PHP error [Table 'head.simpletest512127watchdog' doesn't exist query: INSERT INTO simpletest512127watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'actions', 'Action \'%%action\' added.', 'a:1:{s:7:\"%%action\";s:18:\"Make post unsticky\";}', 5, '', 'http://localhost/head/admin/build/testing', 'http://localhost/head/admin/build/testing', '::1', 1211259942)] severity [E_USER_WARNING] in [/Applications/MAMP/htdocs/head/includes/database.mysqli.inc line 130] [PHP] Exception
Unexpected PHP error [Table 'head.simpletest512127watchdog' doesn't exist query: INSERT INTO simpletest512127watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'actions', 'Action \'%%action\' added.', 'a:1:{s:7:\"%%action\";s:26:\"Promote post to front page\";}', 5, '', 'http://localhost/head/admin/build/testing', 'http://localhost/head/admin/build/testing', '::1', 1211259942)] severity [E_USER_WARNING] in [/Applications/MAMP/htdocs/head/includes/database.mysqli.inc line 130] [PHP] Exception
Unexpected PHP error [Table 'head.simpletest512127watchdog' doesn't exist query: INSERT INTO simpletest512127watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'actions', 'Action \'%%action\' added.', 'a:1:{s:7:\"%%action\";s:27:\"Remove post from front page\";}', 5, '', 'http://localhost/head/admin/build/testing', 'http://localhost/head/admin/build/testing', '::1', 1211259942)] severity [E_USER_WARNING] in [/Applications/MAMP/htdocs/head/includes/database.mysqli.inc line 130] [PHP] Exception
Unexpected PHP error [Table 'head.simpletest512127watchdog' doesn't exist query: INSERT INTO simpletest512127watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'actions', 'Action \'%%action\' added.', 'a:1:{s:7:\"%%action\";s:9:\"Save post\";}', 5, '', 'http://localhost/head/admin/build/testing', 'http://localhost/head/admin/build/testing', '::1', 1211259942)] severity [E_USER_WARNING] in [/Applications/MAMP/htdocs/head/includes/database.mysqli.inc line 130] [PHP] Exception
Unexpected PHP error [Table 'head.simpletest512127watchdog' doesn't exist query: INSERT INTO simpletest512127watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'actions', 'Action \'%%action\' added.', 'a:1:{s:7:\"%%action\";s:30:\"Ban IP address of current user\";}', 5, '', 'http://localhost/head/admin/build/testing', 'http://localhost/head/admin/build/testing', '::1', 1211259942)] severity [E_USER_WARNING] in [/Applications/MAMP/htdocs/head/includes/database.mysqli.inc line 130] [PHP] Exception
Unexpected PHP error [Table 'head.simpletest512127watchdog' doesn't exist query: INSERT INTO simpletest512127watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'actions', 'Action \'%%action\' added.', 'a:1:{s:7:\"%%action\";s:18:\"Block current user\";}', 5, '', 'http://localhost/head/admin/build/testing', 'http://localhost/head/admin/build/testing', '::1', 1211259942)] severity [E_USER_WARNING] in [/Applications/MAMP/htdocs/head/includes/database.mysqli.inc line 130] [PHP] Exception

#1

boombatower - May 20, 2008 - 17:06

Been pending for some time http://drupal.org/node/205157.

#2

webchick - May 20, 2008 - 17:17

Is this a duplicate? That seems to be an issue to add tests, not fix the existing ones.

#3

boombatower - May 20, 2008 - 19:43

I am for closing the other issue and using this one.

It was, but cwgordon7 marked it as needs work and attempted to fix it. I think he ran into allot of issues and it has been lying dormant ever since. The issue for creating the test was completed so probably best to mark it closed again.

#4

cwgordon7 - May 20, 2008 - 20:42

I know, this is the *weirdest* exception. For some reason the table watchdog does not exist in the new database...?

The fails all seem to be on the unassigns, I wonder if this is done correctly in the tests or if something has changed in HEAD?

#5

cwgordon7 - May 31, 2008 - 02:08

I figured out the weird exceptions: SimpleTest was installing the modules in the wrong order! Haha, that's funny...

AttachmentSizeStatusTest resultOperations
weirdness_fixed.patch832 bytesIgnoredNoneNone

#6

cwgordon7 - May 31, 2008 - 03:14
Status:active» needs review

Better patch. All trigger tests now pass. Review please!

AttachmentSizeStatusTest resultOperations
trigger_tests_passing_01.patch2.06 KBIgnoredNoneNone

#7

cwgordon7 - May 31, 2008 - 04:48

Er. Take two.

AttachmentSizeStatusTest resultOperations
trigger_tests_passing_02.patch2.09 KBIgnoredNoneNone

#8

Senpai - May 31, 2008 - 16:04
Status:needs review» reviewed & tested by the community

Tested #7 against a fresh copy of HEAD, and a virgin db. Triggers reports 368 passes, 0 fails and 0 exceptions. Success!

#9

boombatower - May 31, 2008 - 17:18

This is nit picking, but since this is different from the original code I thought I would bring it up.

Is there any reason for

<?php
$args
= func_get_args();
$modules = array_unique(array_merge(drupal_verify_profile('default', 'en'), $args));
?>

instead of

<?php
$modules
= array_unique(array_merge(drupal_verify_profile('default', 'en'), func_get_args()));
?>

Since args is never used after that.

#10

cwgordon7 - May 31, 2008 - 18:39

Please see http://us3.php.net/func_get_args.

Note: Because this function depends on the current scope to determine parameter details, it cannot be used as a function parameter. If this value must be passed, the results should be assigned to a variable, and that variable should be passed.

#11

boombatower - June 1, 2008 - 23:42

Makes sense.

#12

Dries - June 2, 2008 - 17:39
Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks.

#13

Anonymous (not verified) - June 16, 2008 - 17:41
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.