| Comment | File | Size | Author |
|---|---|---|---|
| #18 | drupal8.filter-admintest.18.patch | 3.08 KB | sun |
| #5 | interdiff.txt | 501 bytes | sun |
| #5 | drupal8.filter-admintest.5.patch | 3.07 KB | sun |
| #2 | filter-2254183-2.patch | 3.12 KB | tim.plunkett |
| testperf.filter-FilterAdminTest.patch | 1.8 KB | sun |
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | drupal8.filter-admintest.18.patch | 3.08 KB | sun |
| #5 | interdiff.txt | 501 bytes | sun |
| #5 | drupal8.filter-admintest.5.patch | 3.07 KB | sun |
| #2 | filter-2254183-2.patch | 3.12 KB | tim.plunkett |
| testperf.filter-FilterAdminTest.patch | 1.8 KB | sun |
Comments
Comment #2
tim.plunkettWe need to set those formats up now.
Comment #3
sunThe "API" here is rather
$this->checkPermissions(array(), TRUE);
...but that can be fixed later.
Comment #4
sunCreated #2256317: Remove static caching from WebTestBase::checkPermissions()
Comment #5
sunThat has landed, so we can simply remove that drupal_static_reset() now. :-)
Comment #7
sun5: drupal8.filter-admintest.5.patch queued for re-testing.
Comment #8
sunCreated #2258161: Random test failure in Drupal\language\Tests\LanguageFallbackTest
Comment #9
dries commentedHow do we know the performance improvement is worth the extra complexity/brittleness?
Comment #10
tim.plunkettI would say there is *less* brittleness, because we're no longer relying on the needs of standard profile to test our APIs.
We're now explicitly setting up our expectations.
And I think adjusting this test if we ever want to adjust the filters we ship with would be more complex.
Comment #11
sunThis issue is part of an effort to clean up the last remaining tests that still depend on the Standard profile.
Yes, this is not only improving performance, it is also decoupling a functional module test from Standard profile/product expectations.
Only tests of the Standard profile itself should use the Standard profile in tests. That is, because only Standard profile knows its own expectations.
All other tests should not make any assumptions about possibly existing default configuration of an(y) installation profile. That's why we introduced the Testing profile, which ships with no modules and no configuration, so module tests can start off a clean slate.
I do agree that the necessary code to set up test fixtures is very verbose and we should simplify and improve that. To do so, I recently posted a revised proposal in #913086-112: Allow modules to provide default configuration for running tests
However, all other tests in HEAD are setting up fixtures as in this patch, so that shouldn't hold up this patch.
Comment #12
webchickBack to Dries. Though for my part, I would vastly prefer to see this handled via #2096899: Add $EntityType::create() to simplify creating new entities (which both test authors and distro authors could use) than repeating this verbose scaffolding everywhere.
Comment #13
webchickComment #14
sunClarification here: #913086-116: Allow modules to provide default configuration for running tests
Not really on-topic/in-scope for this issue here. This patch just does what all other tests in HEAD are doing already.
Comment #15
berdirFrom my comment in the issue that webchick mentioned above (#2096899-24: Add $EntityType::create() to simplify creating new entities):
The change is in line with what we've been doing in many other tests and while it is ugly, that is not the fault of entity API's but the problem of missing standardized test fixtures as @sun pointed out. And we apparently even have an issue to address that ;)
Comment #16
catchYes agreed with berdir/sun, this is verbosity rather than complexity and it makes the test less brittle rather than more.
Comment #18
sunRe-rolled against HEAD.
Comment #19
dries commentedLooked at it more and it actually is better. Committed to 8.x. Thanks.