From 75dbb93657ce4b448a831bd4d7e550148026d2fb Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 28 Mar 2020 21:52:57 -0400 Subject: [PATCH] APIv4 - Add test coverage for expected fields from join --- tests/phpunit/api/v4/Query/OptionValueJoinTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/api/v4/Query/OptionValueJoinTest.php b/tests/phpunit/api/v4/Query/OptionValueJoinTest.php index f9a34f6347c8..ebed0bce715e 100644 --- a/tests/phpunit/api/v4/Query/OptionValueJoinTest.php +++ b/tests/phpunit/api/v4/Query/OptionValueJoinTest.php @@ -55,6 +55,9 @@ public function testCommunicationMethodJoin() { $query->where[] = ['preferred_communication_method', 'IS NOT NULL']; $results = $query->run(); $first = array_shift($results); + $keys = array_keys($first); + sort($keys); + $this->assertEquals(['first_name', 'id', 'preferred_communication_method'], $keys); $firstPreferredMethod = array_shift($first['preferred_communication_method']); $this->assertEquals(