Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
76aedbef
Commit
76aedbef
authored
Jun 08, 2008
by
Dries Buytaert
Browse files
- Patch
#267813
by alpritt: fixed some user module tests.
parent
caa2e7e1
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/simpletest/drupal_reporter.php
View file @
76aedbef
...
...
@@ -252,6 +252,6 @@ function getParentWeight($form = NULL, $keys = NULL ) {
}
function
unit_tests
(
$args
,
$reporter
)
{
return
$reporter
->
form
[
'Drupal
U
nit
T
ests'
];
return
$reporter
->
form
[
'Drupal
u
nit
t
ests'
];
}
?>
\ No newline at end of file
?>
modules/simpletest/drupal_test_suite.php
View file @
76aedbef
...
...
@@ -36,7 +36,7 @@ class DrupalTests extends DrupalTestSuite {
*/
function
DrupalTests
(
$class_list
=
NULL
)
{
static
$classes
;
$this
->
DrupalTestSuite
(
'Drupal
U
nit
T
ests'
);
$this
->
DrupalTestSuite
(
'Drupal
u
nit
t
ests'
);
// Tricky part to avoid double inclusion.
if
(
!
$classes
)
{
...
...
modules/simpletest/reporter.php
View file @
76aedbef
...
...
@@ -210,9 +210,9 @@ function paintFooter($test_name) {
print
"OK
\n
"
;
}
else
{
print
"FAILURES
!!!
\n
"
;
print
"FAILURES
\n
"
;
}
print
"Test cases run: "
.
$this
->
getTestCaseProgress
()
.
"/"
.
$this
->
getTestCaseCount
()
.
",
P
asses: "
.
$this
->
getPassCount
()
.
",
F
ailures: "
.
$this
->
getFailCount
()
.
",
E
xceptions: "
.
$this
->
getExceptionCount
()
.
"
\n
"
;
print
"Test cases run: "
.
$this
->
getTestCaseProgress
()
.
"/"
.
$this
->
getTestCaseCount
()
.
",
p
asses: "
.
$this
->
getPassCount
()
.
",
f
ailures: "
.
$this
->
getFailCount
()
.
",
e
xceptions: "
.
$this
->
getExceptionCount
()
.
"
\n
"
;
}
/**
...
...
modules/user/user.test
View file @
76aedbef
...
...
@@ -302,7 +302,7 @@ class UserPictureTestCase extends DrupalWebTestCase {
$this
->
assertText
(
t
(
'The changes have been saved.'
));
// Check if image is displayed in user's profile page.
$this
->
assertRaw
(
file_create_url
(
$picture_
url
),
t
(
"Image is displayed in user's profile page"
));
$this
->
assertRaw
(
file_create_url
(
$picture_
path
),
t
(
"Image is displayed in user's profile page"
));
// Check if file is located in proper directory.
$this
->
assertTrue
(
is_file
(
$picture_path
),
t
(
'File is located in proper directory'
));
...
...
@@ -404,9 +404,10 @@ class UserPictureTestCase extends DrupalWebTestCase {
function
saveUserPicture
(
$image
)
{
$edit
=
array
(
'files[picture_upload]'
=>
realpath
(
$image
->
filename
));
$this
->
drupalPost
(
'user/'
.
$this
->
user
->
uid
.
'/edit'
,
$edit
,
t
(
'Save'
));
$img_info
=
image_get_info
(
$image
->
filename
);
$picture_dir
=
variable_get
(
'user_picture_path'
,
'pictures'
);
$pic_path
=
file_directory_path
()
.
'/'
.
$picture_dir
.
'/picture-'
.
$this
->
user
->
uid
.
'.jpg'
;
$pic_path
=
file_directory_path
()
.
'/'
.
$picture_dir
.
'/picture-'
.
$this
->
user
->
uid
.
'.'
.
$img_info
[
'extension'
]
;
return
$pic_path
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment