Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
4f60c4af
Commit
4f60c4af
authored
Jul 15, 2013
by
Dan Poltawski
Browse files
MDL-40666 cohort: remove duplicated code from tests
parent
07bbbcf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
cohort/tests/externallib_test.php
View file @
4f60c4af
...
@@ -147,10 +147,6 @@ class core_cohort_external_testcase extends externallib_advanced_testcase {
...
@@ -147,10 +147,6 @@ class core_cohort_external_testcase extends externallib_advanced_testcase {
// Check we retrieve the good total number of enrolled cohorts + no error on capability.
// Check we retrieve the good total number of enrolled cohorts + no error on capability.
$this
->
assertEquals
(
2
,
count
(
$returnedcohorts
));
$this
->
assertEquals
(
2
,
count
(
$returnedcohorts
));
// Call the external function.
$returnedcohorts
=
core_cohort_external
::
get_cohorts
(
array
(
$cohort1
->
id
,
$cohort2
->
id
));
foreach
(
$returnedcohorts
as
$enrolledcohort
)
{
foreach
(
$returnedcohorts
as
$enrolledcohort
)
{
if
(
$enrolledcohort
[
'idnumber'
]
==
$cohort1
->
idnumber
)
{
if
(
$enrolledcohort
[
'idnumber'
]
==
$cohort1
->
idnumber
)
{
$this
->
assertEquals
(
$cohort1
->
name
,
$enrolledcohort
[
'name'
]);
$this
->
assertEquals
(
$cohort1
->
name
,
$enrolledcohort
[
'name'
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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