Problem/Motivation

The module could use more tests in order to increase coverage. Kernel tests to ensure all the components work together would be a start.

Proposed resolution

Add Kernel tests to cover components.

CommentFileSizeAuthor
#2 2986241-2.patch3.1 KBieguskiza

Comments

ieguskiza created an issue. See original summary.

ieguskiza’s picture

StatusFileSize
new3.1 KB

I'm not entirely sure what we should test with Kernel tests so I'm uploading a small patch with a couple of tests that make sure the rendering of the different elements is done correctly.
Please feel free to improve on the ticket description and provide suggestions on what should be tested.

richardcanoe’s picture

Status: Active » Needs review

"Kernel tests are integration tests that test on components. You can install modules."

These tests show that this module works in conjunction with languages as it is required to.

I have tested these locally and are a good start to adding tests for this module.

AritoMelo’s picture

I give my +1 as a Code reviewer after installing the project and running the test, all green, good work!

I hope others extend the test as needed.

AritoMelo’s picture

For testing the solution after the commit, follow this steps:

1- checkout "OPENEUROPA-584" branch

2- Fix composer file with PHP version > 7

3- Composer Install composer install

4- On runner.yaml.dist adapt the db settings to match yours

database:
    host: "your_host"
    port: "your_db_port"
    name: "drupal"
    user: "your_user"
    password: "your_pass"

5- Setup the site via openeuropa ROBO task

./vendor/bin/run drupal:site-setup
./vendor/bin/run drupal:site-install

6- Run test

./vendor/bin/phpunit --list-tests

./vendor/bin/phpunit