User dash: adjust test to make sure contributions are chronological
authorAndrew Hunt <andrew@aghstrategies.com>
Wed, 27 Mar 2019 17:31:37 +0000 (13:31 -0400)
committerAndrew Hunt <andrew@aghstrategies.com>
Wed, 27 Mar 2019 17:31:37 +0000 (13:31 -0400)
tests/phpunit/CRM/Contact/Page/View/UserDashBoardTest.php

index d699dbf5729b0fa6f03b5f2c100ecbe50b3eac21..998da15a70299bf62f10f17cd0c4505263cebe50 100644 (file)
@@ -97,8 +97,8 @@ class CRM_Contact_Page_View_UserDashBoardTest extends CiviUnitTestCase {
     ]);
     $this->contributions[] = $this->contributionCreate([
       'contact_id' => $this->contactID,
-      'receive_date' => '2018-11-21',
-      'receipt_date' => '2018-11-22',
+      'receive_date' => '2018-11-22',
+      'receipt_date' => '2018-11-23',
       'trxn_id' => '',
       'invoice_id' => '',
     ]);
@@ -109,7 +109,7 @@ class CRM_Contact_Page_View_UserDashBoardTest extends CiviUnitTestCase {
     ]);
     $this->contributions[] = $this->contributionCreate([
       'contact_id' => $this->contactID,
-      'receive_date' => '2018-11-21',
+      'receive_date' => '2018-11-20',
       'amount_level' => 'high',
       'contribution_status_id' => 'Cancelled',
       'invoice_id' => NULL,
@@ -125,7 +125,7 @@ class CRM_Contact_Page_View_UserDashBoardTest extends CiviUnitTestCase {
     ];
 
     $this->assertPageContains($expectedStrings);
-    $this->assertSmartyVariableArrayIncludes('contribute_rows', 0, [
+    $this->assertSmartyVariableArrayIncludes('contribute_rows', 1, [
       'contact_id' => $this->contactID,
       'contribution_id' => '1',
       'total_amount' => '100.00',