CommentFileSizeAuthor
#3 menu_test_0.patch2.52 KBfranskuipers

Comments

Tiburón’s picture

Cases:

A)

db has no menu_links
reset = false
names = null
check if names is empty

B)

db has no menu_links
reset = true
names = null
check if names is empty

C)

db has a menu_link
reset = false
names = null
check if names is not empty (as in the menu_link is present)

D)

db has a menu_link
reset = true
names = null
check if names is not empty (as in the menu_link is present)

E)

db has a menu_link
reset = false
names = null
check if names is not empty (as in the menu_link is present)
add a menu_link
reset = false
names = the old set of menu_link names
check if names is not empty (as in the old menu_link is present but not the new one)

F)

db has a menu_link
reset = false
names = null
check if names is not empty (as in the menu_link is present)
add a menu_link
reset = true
names = the old set of menu_link names
check if names is not empty (as in the old menu_link is present including the new one)

Franskuipers & Christian Larsen

Tiburón’s picture

G)

db has a menu_link
reset = false
names = null
check if names is not empty (as in the menu_link is present)
empty menu_link
reset = false
names = the old set of menu_link name
check if names is not empty (as in the old menu_link is present)

H)

db has a menu_link
reset = false
names = null
check if names is not empty (as in the menu_link is present)
empty menu_link
reset = true
names = the old set of menu_link name
check if names is empty

Franskuipers & Christian Larsen

franskuipers’s picture

StatusFileSize
new2.52 KB

My first test and contribution to core. Thanks for the Testing party in Szeged :-)

Some questions:

  • I added this test to /modules/menu/menu.test, but I am unsure if /modules/simpletest/tests/menu.test is a better place for this test | which criteria are there?
  • Can i use the function from another test (MenuTestCase::addMenuItem()) in my test, or should I write my own routine?
  • Not all cases from above are covered, I didn't want to change core variables in my test function. Is this right?
franskuipers’s picture

Status: Active » Needs review

Changed status

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

franskuipers’s picture

Status: Needs work » Closed (won't fix)

Duplicate: http://drupal.org/node/473240

Test is included in the patch on that issue.