Here is the test for Simpletest module.

CommentFileSizeAuthor
#5 image.test5.15 KBvladimir.dolgopolov
image.test5.18 KBvladimir.dolgopolov

Comments

vladimir.dolgopolov’s picture

Category: feature » task
Status: Active » Needs review

Oops, change category.

drewish’s picture

Version: 6.x-1.0-alpha1 » 6.x-1.x-dev
Status: Needs review » Needs work

I'm using imagemagick as the toolkit and these don't all pass:
16 passes, 11 fails and 0 exceptions.

[browser] POST by click on Submit at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 210]	FAIL
Checking message at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/tests/image_module.test line 92]	FAIL
Checking title : simpletest_x18CP9TmMF at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/tests/image_module.test line 98]	FAIL
Checking body: simpletest_kKPnbQr7fU8SzSXbprHGIcXVrS9Ooa2Cb4amS3OF8Qel753UHo2UDyUEmbeAxpa8vobjNO7jFhKHn9zajiYH2P7YOnb5GogMRwYM at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/tests/image_module.test line 99]	FAIL
Checking for presence and size of uploaded image at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/tests/image_module.test line 116]	FAIL
[browser] GET path "node//edit" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 200]	OK
[browser] Setting title="simpletest_Ymm5io95gg" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	FAIL
[browser] Setting body="simpletest_SJkpkBZKgNyhZpyxCQ6wOyUvsz3oQtgOwN8v8TdsJTcxrPRpukt9X2hDymJQ_JAWKVyMsYjJSVNvVtU4xIOZU0NYD_ZVmJXQlXAc" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	FAIL
[browser] Setting files[image]="/Users/amorton/Sites/d6/sites/all/modules/simpletest/tests/ImageModuleTest.png" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	FAIL
[browser] POST by click on Submit at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 210]	FAIL
Checking title : simpletest_Ymm5io95gg at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/tests/image_module.test line 128]	FAIL
Checking body: simpletest_SJkpkBZKgNyhZpyxCQ6wOyUvsz3oQtgOwN8v8TdsJTcxrPRpukt9X2hDymJQ_JAWKVyMsYjJSVNvVtU4xIOZU0NYD_ZVmJXQlXAc at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/tests/image_module.test line 129]	FAIL
vladimir.dolgopolov’s picture

Status: Needs work » Needs review

It seems you are using the legacy test from sites/all/modules/simpletest/tests/image_module.test ("Image Module" on the simpletest page).
You should put this one here sites/all/modules/image/tests/image.test and run "Image tests".

drewish’s picture

Status: Needs review » Needs work

that's where i'd put it but i might have been running the wrong one. running this i get:

40 passes, 11 fails and 0 exceptions.

[role] created name: simpletest__sw8, id: 12 at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 367]	OK
[role] created permissions: create images, view original images, edit own images, edit images at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 371]	OK
[user] name: simpletest_o63e pass: ivu3Esq4SZ created at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 401]	OK
[browser] GET path "user" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 200]	OK
[browser] Setting name="simpletest_o63e" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	OK
[browser] Setting pass="ivu3Esq4SZ" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	OK
[browser] POST by click on Log in at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 210]	OK
[login] found name: simpletest_o63e at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 432]	OK
[login] not blocked at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 433]	OK
[login] not reserved at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 434]	OK
[browser] GET path "node/add/image" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 200]	OK
[browser] Setting title="simpletest_LmaT" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	OK
[browser] Setting body="simpletest_a08E" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	OK
[browser] Setting files[image]="/Users/amorton/Sites/d6/misc/druplicon.png" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	OK
[browser] POST by click on Save at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 210]	OK
Image created. Text [Image <em>simpletest_LmaT</em> has been created.] not detected in [String: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> ...] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 47]	FAIL
Image found in database. [Boolean: false] should not be null at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 50]	OK
Image preview is on the page. Pattern [|<img[^>]+?[^>]+?>|] detected at character [1503] in [String: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> ...] as [<img src="/themes/garland/logo.png" alt="d6" id="logo" />] in region [...logo-floater"> <h1><a href="/" title="d6"><img src="/themes/garland/logo.png" alt="d6" id="l...] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 54]	OK
Image preview exists. Expected true, got [Boolean: false] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 55]	FAIL
Original image is on the page. Pattern [|<img[^>]+?[^>]+?>|] detected at character [1520] in [String: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> ...] as [<img src="/themes/garland/logo.png" alt="d6" id="logo" />] in region [...logo-floater"> <h1><a href="/" title="d6"><img src="/themes/garland/logo.png" alt="d6" id="l...] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 58]	OK
Original image exists. Expected true, got [Boolean: false] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 59]	FAIL
Image thumbnail is on the page. Pattern [|<img[^>]+?[^>]+?>|] detected at character [1520] in [String: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> ...] as [<img src="/themes/garland/logo.png" alt="d6" id="logo" />] in region [...logo-floater"> <h1><a href="/" title="d6"><img src="/themes/garland/logo.png" alt="d6" id="l...] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 62]	OK
Image thumbnail exists. Expected true, got [Boolean: false] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 63]	FAIL
[browser] GET path "node//edit" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 200]	OK
[browser] Setting title="simpletest_LmaT" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	FAIL
[browser] Setting files[image]="/Users/amorton/Sites/d6/misc/throbber.gif" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	FAIL
[browser] POST by click on Save at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 210]	FAIL
The previous image deleted. Expected false, got [Boolean: false] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 72]	OK
[browser] GET path "node//delete" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 200]	OK
[browser] POST by click on Delete at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 210]	FAIL
Image created. Text [Image <em>simpletest_LmaT</em> has been deleted.] not detected in [String: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> ...] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 76]	FAIL
Image not found in database. Expected false, got [Boolean: false] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 78]	OK
Image deleted. Expected false, got [Boolean: false] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 79]	OK
[role] created name: simpletest__jh7, id: 13 at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 367]	OK
[role] created permissions: create images, view original images, edit own images, edit images at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 371]	OK
[user] name: simpletest_I3rG pass: 7pesh2c7Mo created at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 401]	OK
[browser] GET path "user" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 200]	OK
[browser] Setting name="simpletest_I3rG" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	OK
[browser] Setting pass="7pesh2c7Mo" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	OK
[browser] POST by click on Log in at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 210]	OK
[login] found name: simpletest_I3rG at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 432]	OK
[login] not blocked at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 433]	OK
[login] not reserved at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 434]	OK
[browser] GET path "node/add/image" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 200]	OK
[browser] Setting title="simpletest_AFUL" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	OK
[browser] Setting body="simpletest_IY1R" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	OK
[browser] Setting files[image]="/Users/amorton/Sites/d6/misc/druplicon.png" at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 206]	OK
[browser] POST by click on Save at [/Users/amorton/Sites/d6/sites/all/modules/simpletest/drupal_test_case.php line 210]	OK
Image created. Text [Image <em>simpletest_AFUL</em> has been created.] not detected in [String: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> ...] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 89]	FAIL
Image found in database. [Boolean: false] should not be null at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 92]	OK
Images nodes are equal. Expected true, got [Boolean: false] at [/Users/amorton/Sites/d6/sites/all/modules/image/tests/image.test line 107]	FAIL
vladimir.dolgopolov’s picture

Status: Needs work » Needs review
StatusFileSize
new5.15 KB

The problem was fixed (variable 'image_sizes' not always exists).

I remade the test.

drewish’s picture

Status: Needs review » Fixed

great, thanks again. committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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