I am encountering an warning error in UnitTest cases, after upgrading from php7to php8, My folder structure is app/tests/cases/api/ In this folder I have all the test cases, I have one abstract class file BaseApiTest.php, I am using this file in all other testcases. I have tried to exclude the BaseApiTest.php file in Phpunit.xml and tried to supress the warning errors, but nothing is working..Please anyone suggest what I can do, so that the warning issue will be fixed. Thanks
Class app\tests\cases\api\BaseApiTest declared in /var/www/accounts.localhost/app/tests/cases/api/BaseApiTest.php is abstract
below is my sample codes
<?php namespace app\tests\cases\api; use accounts\test\Integration; use PHPUnit\DbUnit\DataSet\YamlDataSet; abstract class BaseApiTest extends Integration { } ?> below is the phpunit.xml file
<?xml version="1.0" encoding="UTF-8"?> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="phpunit.xsd" bootstrap="tests/bootstrap.php" cacheDirectory=".phpunit.cache" beStrictAboutOutputDuringTests="true" failOnRisky="true" failOnWarning="true" colors="true"> <testsuite name="My Test Suite"> <directory suffix="Test.php">./tests</directory> </testsuite> <source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true"> <include> <directory suffix=".php">src</directory> </include> <exclude> <file>app/tests/cases/api/BaseApiTest.php</file> </exclude> </source> </phpunit>
Test