liip / liip/LiipFunctionalTestBundle

Can't overwrite WebTestCase $env static property

Open
#595 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
648
Forks
179
PR merge metrics
No merged PRs in 30d

Description

### 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)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Liip\FunctionalTestBundle\Test\WebTestCase and review the related files shown in pull request #593. Reproduce the case with PHP 8.0, Symfony 5.4, and the renamed testing environment; the work is done when the functional test passes without the non-existent "secret" parameter error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.