MDL-67668 behat: Share behat_behat functionality with forms
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 10 Nov 2020 07:10:30 +0000 (15:10 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Mon, 23 Nov 2020 01:01:19 +0000 (09:01 +0800)
commit548da2ce97e094aa576be1983fe9b4da57d55262
tree0412e4868a70867a1b3001de7342a70ade59d096
parent59daa3b54870b3d071f7683073abc429097a7c11
MDL-67668 behat: Share behat_behat functionality with forms

Behat form fields are implemented in a way completely isolated from the
rest of the Behat Context system. Whereas regular step definitions have
access to execute steps, to call `find`, check for JS running, and other
related functionality, the Moodle implementation of a field type does
not have any access to this.

By moving the core functionality of behat_base to a new trait, and the
constants to a new interface, the functionality can also be used in
behat form fields in the same way as elsewhere.
lib/behat/behat_base.php
lib/behat/classes/behat_session_interface.php [new file with mode: 0644]
lib/behat/classes/behat_session_trait.php [new file with mode: 0644]