Opened 8 years ago
Last modified 4 years ago
#37190 new enhancement
Split out function declarations and code executions.
Reported by: | stephenharris | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
Quite a few php files in the root directory contain function definitions and code executions. This makes it impossible to unit-test those functions. Should we move those function definitions to includes/<file-name>.php
and then include them at the top of the root file?
Change History (3)
Note: See
TracTickets for help on using
tickets.
Thanks for reporting this @stephenharris . Could you specify which files you found with mixed function declarations and code execution?
In the interests of not moving code around just for the sake of it, it would be best to only move functions out when writing unit tests for them. Also, in the the process of moving the function out, we'll need to: