From cf41f25a2afccc9588bbab852c70a3567f074ba4 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 12 Jun 2019 06:37:11 -0400 Subject: [PATCH] Fix phpunit 6 support --- ext/afform/core/tests/phpunit/CRM/Afform/UtilTest.php | 7 ++++++- ext/afform/mock/tests/phpunit/api/v4/AfformTestCase.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ext/afform/core/tests/phpunit/CRM/Afform/UtilTest.php b/ext/afform/core/tests/phpunit/CRM/Afform/UtilTest.php index 32263e1ac2..288141f8d6 100644 --- a/ext/afform/core/tests/phpunit/CRM/Afform/UtilTest.php +++ b/ext/afform/core/tests/phpunit/CRM/Afform/UtilTest.php @@ -6,11 +6,14 @@ use Civi\Test\TransactionalInterface; /** * @group headless */ -class CRM_Afform_UtilTest extends \PHPUnit_Framework_TestCase implements HeadlessInterface, TransactionalInterface { +class CRM_Afform_UtilTest extends \PHPUnit\Framework\TestCase implements HeadlessInterface, TransactionalInterface { /** * Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile(). + * * See: https://github.com/civicrm/org.civicrm.testapalooza/blob/master/civi-test.md + * + * @throws \CRM_Extension_Exception_ParseException */ public function setUpHeadless() { return \Civi\Test::headless() @@ -42,7 +45,9 @@ class CRM_Afform_UtilTest extends \PHPUnit_Framework_TestCase implements Headles * @param $inputFileName * @param $toFormat * @param $expected + * * @dataProvider getNameExamples + * @throws \Exception */ public function testNameConversion($inputFileName, $toFormat, $expected) { $actual = _afform_angular_module_name($inputFileName, $toFormat); diff --git a/ext/afform/mock/tests/phpunit/api/v4/AfformTestCase.php b/ext/afform/mock/tests/phpunit/api/v4/AfformTestCase.php index 94f16b8f91..6d3e9907af 100644 --- a/ext/afform/mock/tests/phpunit/api/v4/AfformTestCase.php +++ b/ext/afform/mock/tests/phpunit/api/v4/AfformTestCase.php @@ -6,7 +6,7 @@ use Civi\Test\TransactionalInterface; /** * Base class for Afform API tests. */ -abstract class api_v4_AfformTestCase extends \PHPUnit_Framework_TestCase implements HeadlessInterface, TransactionalInterface { +abstract class api_v4_AfformTestCase extends \PHPUnit\Framework\TestCase implements HeadlessInterface, TransactionalInterface { /** * Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile(). -- 2.25.1