Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't overwrite WebTestCase $env static property #595

Open
mikysan opened this issue Jan 17, 2022 · 0 comments
Open

Can't overwrite WebTestCase $env static property #595

mikysan opened this issue Jan 17, 2022 · 0 comments

Comments

@mikysan
Copy link
Contributor

mikysan commented Jan 17, 2022

Preconditions

  1. PHP 8.0
  2. Symfony 5.4
  3. liip/functional-test-bundle 4.5

Steps to reproduce

  1. rename Symfony test environment to testing
  2. create a test like following
namespace App\Tests;

use Liip\FunctionalTestBundle\Test\WebTestCase;

class FunctionalTestCase extends WebTestCase
{
    protected static $env = 'testing';

    public function testFoo()
    {
        $this->assertTrue(true);
    }
}

Expected result

The test should pass

Actual result

test fail with You have requested a non-existent parameter "secret". error message.

Proposed solution

Replace self::$env with static::$env in related files (see: https://github.com/liip/LiipFunctionalTestBundle/pull/593/files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant