The example code for my automated testing workshop
Find a file
Oliver Davies f0f93912ee 5c: Add test for isPublishable
Using a data provider, multiple arguments can be passed into the test,
such as different combinations of created dates and expected results.

This test also requires mocking the `Time` object as it’s now a
dependency of the article wrapper. The `getCreatedTime` method on the
article also needs to be set to return a specific value.
2020-03-25 12:31:28 +00:00
.github/workflows init 2020-03-25 12:31:28 +00:00
.idea init 2020-03-25 12:31:28 +00:00
config/default init 2020-03-25 12:31:28 +00:00
web 5c: Add test for isPublishable 2020-03-25 12:31:28 +00:00
.gitignore 1b: Add my_module.info.yml 2020-03-25 12:31:28 +00:00
composer.json init 2020-03-25 12:31:28 +00:00
composer.lock init 2020-03-25 12:31:28 +00:00
docker-compose.yaml init 2020-03-25 12:31:28 +00:00
php.ini init 2020-03-25 12:31:28 +00:00
phpunit.xml.dist init 2020-03-25 12:31:28 +00:00
README.md init 2020-03-25 12:31:28 +00:00

Drupal Automated Testing Workshop: Example Code

Updates

If we need to update any of the commits, the changes should be rebased into the existing commits so that they continue to be in a linear order as per the workshop document.

As we want GitHub Actions to run for each commit, we cant just push the latest commit as that would only trigger a build on the final commit. To do this, we can loop over each of the commit SHAs and push each one separately:

for sha1 in $(git rev-list HEAD --reverse) ; do
  git push origin $sha1:master --force
done