dox Executable Documentation

Add field requirements to page

Add requirements of one field

Given the class 'fieldRequirements\\SomeField' extending '\\watoki\\qrator\\form\\Field' with the body ' public function render() { return "Field"; } public function addToHead() { return ["<meta name=\\"this is so meta\\"/>"]; } public function addToFoot() { return ["<script src=\\"someScript.js\\"/>"]; } '
Given the class 'fieldRequirements\\SomeAction' with the body ' public $someProperty; public $otherProperty; '
Given I set an empty handler for 'fieldRequirements\\SomeAction'
Given I registered an action representer for 'fieldRequirements\\SomeAction'
Given I set the field 'someProperty' of 'fieldRequirements\\SomeAction' to be an instance of 'fieldRequirements\\SomeField'
Given I set the field 'otherProperty' of 'fieldRequirements\\SomeAction' to be an instance of 'fieldRequirements\\SomeField'
When I execute 'fieldRequirements\\SomeAction'
Then the head should contains '<meta name="this is so meta"/>'
Then the foot should be '<script src="someScript.js"/>'