Using #OpenCode to create #Behat tests, FeatureContext steps, and hooks to properly set up tests, and fix up a variety of download permissions feels like cheating! #Drupal #AI

Integration passes #PHPStan level 9, writing #Behat tests for rendering and caching is a breeze...

Next steps:
* documentation
* improved transpilation error handling
* extension point for the delegation mechanism for #NeosCMS , e.g. for the future OPGM (Object-Propery Graph-Mapper)
* transpilation from .cpx to TypeScript for isomorphic rendering
* a language server for #PHPStorm etc.
* you name it

Testing delayed Symfony Messenger message handling with Behat

Lately, I’ve been working on a hobby project that has many scenarios where operations are getting scheduled to be handledasynchronously in the future - somet...

Dejan Angelov
Testing delayed Symfony Messenger message handling with Behat

Lately, I’ve been working on a hobby project that has many scenarios where operations are getting scheduled to be handledasynchronously in the future - somet...

Dejan Angelov

New blog post - "Testing delayed Symfony Messenger message handling with Behat" #php #symfony #behat

https://angelovdejan.me/2025/07/22/testing-delayed-symfony-messenger-message-handling-with-behat.html

Testing delayed Symfony Messenger message handling with Behat

Lately, I’ve been working on a hobby project that has many scenarios where operations are getting scheduled to be handledasynchronously in the future - somet...

Dejan Angelov
Vous avez une erreur ```#PHP Warning: require(…/vendor/behat/gherkin/src/../../../i18n.php): Failed to open stream: No such file or directory``` ?
C'est dû à un probléme dans les dernières release de #behat .
Revenir à la version 4.12 régle le problème
```composer require behat/gherkin "~4.12.0"```

All software has #bugs

I made my first github commit for the #Moodle #Gapfill question type In April 2012. I have made 1,510 commits since then. This year on Feb 5 2025 Mark Johnson reported a bug in backup caused by spelling errors in field names.

https://github.com/marcusgreen/moodle-qtype_gapfill/issues/117
I have created a #behat test to reproduce the bug and a patch to fix it. It took approximately 5 hours in total.
All software has bugs, automated tests are not a luxury.

Typos in backup fields · Issue #117 · marcusgreen/moodle-qtype_gapfill

Describe the bug The backup class has typos in the field names for combined feedback. They are correctfedback and correctfeddbackformat instead of correctfeedback and correctfeedbackformat. To Repr...

GitHub
Unused Definitions with Behat Static Analysis

Recently, I've been working on projects with Behat tests. There are hundreds of definitions that can be used in feature file scenarios. I accidentally noticed that one of the definitions is not used at all and could be removed. This would result in less code to maintain, less code to read, and less code to upgrade. But I thought, "That's weird." **Why did not Behat report this definition** in our CI? Oh, because there is no Behat static analysis report out of the box. Let's fix that.

Unused Definitions with Behat Static Analysis

Recently, I've been working on projects with Behat tests. There are hundreds of definitions that can be used in feature file scenarios. I accidentally noticed that one of the definitions is not used at all and could be removed. This would result in less code to maintain, less code to read, and less code to upgrade. But I thought, "That's weird." **Why did not Behat report this definition** in our CI? Oh, because there is no Behat static analysis report out of the box. Let's fix that.

Related: in #Behat, is it possible to “capture” the result of a scenario to use within a subsequent scenario? #PHP

Maybe @ciaran knows. 😁