dox Executable Documentation

Dependent commands

One dependent command

Given the command 'OneDepending'
Given the command 'OneDependency'
Given the command 'OneDepending' depends on 'OneDependency'
When I run the command 'OneDepending'
Then the output should be 'X:OneDependency' . PHP_EOL . 'X:OneDepending'

Do not repeat

Given the command 'TreeOne'
Given the command 'TreeTwo'
Given the command 'TreeThree'
Given the command 'TreeFour' with the body ' function doExecute($arg, \\watoki\\cli\\Console $c) { $c->out->writeLine("X:TreeFour($arg)"); }'
Given the command 'TreeOne' depends on 'TreeTwo'
Given the command 'TreeOne' depends on 'TreeThree'
Given the command 'TreeOne' depends on 'TreeFour' with the arguments array('one')
Given the command 'TreeTwo' depends on 'TreeThree'
Given the command 'TreeTwo' depends on 'TreeFour' with the arguments array('two')
Given the command 'TreeThree' depends on 'TreeFour' with the arguments array('two')
When I run the command 'TreeOne'
Then the output should be 'X:TreeFour(two)' . PHP_EOL . 'X:TreeThree' . PHP_EOL . 'X:TreeTwo' . PHP_EOL . 'X:TreeFour(one)' . PHP_EOL . 'X:TreeOne'

Circles

Given the command 'CircleOne'
Given the command 'CircleTwo'
Given the command 'CircleThree'
Given the command 'CircleOne' depends on 'CircleTwo'
Given the command 'CircleTwo' depends on 'CircleThree'
Given the command 'CircleThree' depends on 'CircleOne'
When try to I run the command 'CircleOne'
Then there should be an error containing 'Circular dependency detected: [CircleOne] -> [CircleTwo] -> [CircleThree] -> [CircleOne]'