From: Coleman Watts Date: Mon, 23 Aug 2021 11:40:09 +0000 (-0400) Subject: Test cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=20b017b248a0f766aced3c4e52a2e4fcc9747455;p=civicrm-core.git Test cleanup --- diff --git a/tests/phpunit/api/v4/Action/RecentItemsTest.php b/tests/phpunit/api/v4/Action/RecentItemsTest.php index 967e37a10e..1ea4a0b229 100644 --- a/tests/phpunit/api/v4/Action/RecentItemsTest.php +++ b/tests/phpunit/api/v4/Action/RecentItemsTest.php @@ -27,10 +27,7 @@ use Civi\Api4\Activity; */ class RecentItemsTest extends UnitTestCase { - /** - * This locks in a fix to ensure that if a user doesn't have permission to view the is_deleted field that doesn't hard fail if that field happens to be in an APIv4 call. - */ - public function testIsDeletedPermission(): void { + public function testAddDeleteActivity(): void { $cid = $this->createLoggedInUser(); $aid = Activity::create(FALSE) @@ -41,6 +38,8 @@ class RecentItemsTest extends UnitTestCase { $this->assertEquals(1, $this->getRecentItemCount(['type' => 'Activity', 'id' => $aid])); + $this->assertStringContainsString('Hello recent!', \CRM_Utils_Recent::get()[0]['title']); + Activity::delete(FALSE)->addWhere('id', '=', $aid)->execute(); $this->assertEquals(0, $this->getRecentItemCount(['type' => 'Activity', 'id' => $aid]));