Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
1a829986
Commit
1a829986
authored
12 years ago
by
colemanw
Browse files
Options
Downloads
Plain Diff
Merge pull request
#375
from yashodha/CRM-12219
CRM-12219
parents
307eb122
b29be8c2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php
+6
-2
6 additions, 2 deletions
tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php
with
6 additions
and
2 deletions
tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php
+
6
−
2
View file @
1a829986
...
...
@@ -57,6 +57,7 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
'join_date'
=>
'20120315'
,
'start_date'
=>
'20120315'
,
'end_date'
=>
'20120615'
,
'is_override'
=>
0
,
);
$this
->
fixtures
[
'phonecall'
]
=
array
(
// createTestObject
'status_id'
=>
1
,
...
...
@@ -67,6 +68,7 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
);
$this
->
fixtures
[
'contact'
]
=
array
(
// API
'version'
=>
3
,
'is_deceased'
=>
0
,
'contact_type'
=>
'Individual'
,
'email'
=>
'test-member@example.com'
,
);
...
...
@@ -274,7 +276,7 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
* an email should be sent.
*/
function
testMembershipJoinDate_Match
()
{
$membership
=
$this
->
createTestObject
(
'CRM_Member_DAO_Membership'
,
$this
->
fixtures
[
'rolling_membership'
]);
$membership
=
$this
->
createTestObject
(
'CRM_Member_DAO_Membership'
,
array_merge
(
$this
->
fixtures
[
'rolling_membership'
]
,
array
(
'status_id'
=>
1
))
);
$this
->
assertTrue
(
is_numeric
(
$membership
->
id
));
$result
=
civicrm_api
(
'Email'
,
'create'
,
array
(
'contact_id'
=>
$membership
->
contact_id
,
...
...
@@ -284,6 +286,7 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
));
$this
->
assertAPISuccess
(
$result
);
$contact
=
civicrm_api
(
'contact'
,
'create'
,
array_merge
(
$this
->
fixtures
[
'contact'
],
array
(
'contact_id'
=>
$membership
->
contact_id
)));
$actionSchedule
=
$this
->
fixtures
[
'sched_membership_join_2week'
];
$actionSchedule
[
'entity_value'
]
=
$membership
->
membership_type_id
;
$actionScheduleDao
=
CRM_Core_BAO_ActionSchedule
::
add
(
$actionSchedule
,
$ids
);
...
...
@@ -340,13 +343,14 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
*/
function
testMembershipEndDate_Match
()
{
// creates membership with end_date = 20120615
$membership
=
$this
->
createTestObject
(
'CRM_Member_DAO_Membership'
,
$this
->
fixtures
[
'rolling_membership'
]);
$membership
=
$this
->
createTestObject
(
'CRM_Member_DAO_Membership'
,
array_merge
(
$this
->
fixtures
[
'rolling_membership'
]
,
array
(
'status_id'
=>
2
))
);
$this
->
assertTrue
(
is_numeric
(
$membership
->
id
));
$result
=
civicrm_api
(
'Email'
,
'create'
,
array
(
'contact_id'
=>
$membership
->
contact_id
,
'email'
=>
'test-member@example.com'
,
'version'
=>
3
,
));
$contact
=
civicrm_api
(
'contact'
,
'create'
,
array_merge
(
$this
->
fixtures
[
'contact'
],
array
(
'contact_id'
=>
$membership
->
contact_id
)));
$this
->
assertAPISuccess
(
$result
);
$actionSchedule
=
$this
->
fixtures
[
'sched_membership_end_2week'
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment