In #2867739: remove FlagViewsFlaggableArgument I am about to modify ShowOnEntityFormTest as part of the process of removing redundant code.
Beforehand I want to modernize ShowOnEntityFormTest.
1) That means moving away from simpletest to BtowserTestBase.
2) D8 core has a policy of tests not using $this->t() unless directly testing translations ... so I am dropping $this->t()
3) I have created a new trait so that we can use grantFlagPermissions() in simpletest test and the more modern form.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | interdiff-2895893-5-6.txt | 1.92 KB | martin107 |
| #6 | WotNoPublish-2895893-6.patch | 8.57 KB | martin107 |
| #5 | interdiff-2895893-4-5.txt | 434 bytes | martin107 |
| #5 | sf-2895893-5.patch | 8.63 KB | martin107 |
Comments
Comment #2
martin107 commentedInitial version ... not passing yet.
Comment #3
martin107 commentedComment #4
martin107 commentedThe passing tests are a screw up...
I can see the linter reporting no errors for ShowOnEntityFormTest
BUT unlike all the other functional tests ShowOnEntityFormTest is not run as far as I can see....
There is a @flag group and the class names/namespaces/file names seem in order.
Can anyone spot my screw up ?
running
../vendor/bin/phpunit --debug -vvv ../modules/flag/tests/src/Functional/ShowOnEntityFormTest.php
shows the state of the test!
Comment #5
martin107 commentedFix the screw up in #4
The test now successfully fail!!!! ... as expected.
Comment #6
martin107 commentedHere is the change record which shows the corruption of the existing tests since last commit!
https://www.drupal.org/node/2847274
The label on a button has been simplified.
That makes this issue a critical bug report.
Comment #8
socketwench commentedFixed! Also added the missing newline. Thanks Martin!