Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ContextTest comparison of ContextActivities signatures. #93

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
14 changes: 9 additions & 5 deletions tests/ContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,15 @@ public function testCompareWithSignature() {
[ 'account' => [ 'homePage' => COMMON_ACCT_HOMEPAGE, 'name' => COMMON_ACCT_NAME ]]
);
$contextActivities1 = new ContextActivities(
[ 'parent' => [ COMMON_ACTIVITY_ID ]]
[
'parent' => [ COMMON_ACTIVITY_ID ]
]
);
$contextActivities2 = new ContextActivities(
[ 'parent' => [ COMMON_ACTIVITY_ID . '/parent' ]],
[ 'grouping' => [ COMMON_ACTIVITY_ID ]]
[
'parent' => [ COMMON_ACTIVITY_ID . '/parent' ],
'grouping' => [ COMMON_ACTIVITY_ID ]
]
);
$ref1 = new StatementRef(
[ 'id' => Util::getUUID() ]
Expand Down Expand Up @@ -270,7 +274,7 @@ public function testCompareWithSignature() {
'description' => 'contextActivities only: mismatch',
'objArgs' => ['contextActivities' => $contextActivities1 ],
'sigArgs' => ['contextActivities' => $contextActivities2 ],
'reason' => 'Comparison of contextActivities failed: Comparison of parent failed: array lengths differ'
'reason' => 'Comparison of contextActivities failed: Comparison of grouping failed: array lengths differ'
],
[
'description' => 'revision only: mismatch',
Expand Down Expand Up @@ -324,7 +328,7 @@ public function testCompareWithSignature() {
'description' => 'full: contextActivities mismatch',
'objArgs' => $full,
'sigArgs' => array_replace($full, ['contextActivities' => $contextActivities2]),
'reason' => 'Comparison of contextActivities failed: Comparison of parent failed: array lengths differ'
'reason' => 'Comparison of contextActivities failed: Comparison of grouping failed: array lengths differ'
],
[
'description' => 'full: revision mismatch',
Expand Down