Functional testing not working with Pimcore environment

Hi There,

I am trying to do functional testing with Pimcore environment in my own project setup (not basic-demo).
I am following the documentation given at this URL:
https://pimcore.com/docs/6.x/Development_Documentation/Development_Tools_and_Details/Testing/Application_Testing.html

When I run the test, it gives error:

$ vendor/bin/simple-phpunit
PHPUnit 7.4.5 by Sebastian Bergmann and contributors.

Testing default
........E                                                           9 / 9 (100%)

Time: 151 ms, Memory: 22.00 MB

There was 1 error:

1) Tests\AppBundle\Controller\DefaultControllerTest::testDefault
Symfony\Component\Config\Exception\FileLocatorFileNotFoundException: The file "./var/config/system.yml" does not exist (in: "").

/var/www/html/my-project/vendor/symfony/symfony/src/Symfony/Component/Config/FileLocator.php:69
/var/www/html/my-project/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Config/FileLocator.php:61
/var/www/html/my-project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php:120
/var/www/html/my-project/vendor/symfony/symfony/src/Symfony/Component/Config/Loader/DelegatingLoader.php:40
/var/www/html/my-project/vendor/pimcore/pimcore/lib/Kernel.php:104
/var/www/html/my-project/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:699
/var/www/html/my-project/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:595
/var/www/html/my-project/vendor/pimcore/pimcore/lib/Kernel.php:183
/var/www/html/my-project/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:136
/var/www/html/my-project/vendor/pimcore/pimcore/lib/Kernel.php:162
/var/www/html/my-project/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php:80
/var/www/html/my-project/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php:48
/var/www/html/my-project/tests/AppBundle/Controller/DefaultControllerTest.php:14

But the file exists because I can open the file with this command:
$ vim ./var/config/system.yml

config_test.yml:

        imports:
            - { resource: config_dev.yml }

        # this cache is used during tests when setting up pimcore
        pimcore:
            cache:
                pool_service_id: pimcore.cache.core.pool.array

        parameters:
            pimcore_test.db.dsn: '%env(PIMCORE_TEST_DB_DSN)%'
            env(PIMCORE_TEST_DB_DSN): ~

/tests/AppBundle/Controller/DefaultControllerTest.php:

<?php

declare(strict_types = 1);

namespace Tests\AppBundle\Controller;

use Pimcore\Test\WebTestCase;

class DefaultControllerTest extends WebTestCase {

    public function testDefault() {
	$client = static::createClient(); //It works after removing this line

	$this->assertEquals(
		1, 1
	);
    }

}

/phpunit.xml.dist:

        <?xml version="1.0" encoding="UTF-8"?>
        <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.4/phpunit.xsd"
                 bootstrap="tests/bootstrap.php"
                 colors="true"
                 verbose="true"
        >
            <testsuite name="default">
                <directory suffix="Test.php">tests</directory>
            </testsuite>

            <filter>
                <whitelist processUncoveredFilesFromWhitelist="true">
                    <directory suffix=".php">src</directory>
                </whitelist>
            </filter>

            <php>
                <!-- adjust as needed -->
                <env name="SYMFONY_PHPUNIT_VERSION" value="7.4" />
                <env name="PIMCORE_PROJECT_ROOT" value="." />
                <env name="KERNEL_DIR" value="app" />
                <env name="KERNEL_CLASS" value="AppKernel" />
            </php>
        </phpunit>