View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022231 | mantisbt | markdown | public | 2017-01-22 18:15 | 2017-02-01 08:31 |
Reporter | vboctor | Assigned To | joel | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | assigned | Resolution | open | ||
Product Version | 2.1.0 | ||||
Summary | 0022231: Fix unit tests for markdown | ||||
Description | We need to revise unit tests for Markdown to:
| ||||
Tags | No tags attached. | ||||
I'm having an issue of including the helper methods in my tests suites:
I'm referring with the Bug and Notes processing methods:
It seems that the helper methods is asking a db connection though. right? Q? is there a way to inject any required dependencies (autoloading) from the console? |
|
I'm sorry I don't have time to look into this right now, but I suggest you check out how it's done for other API tests (in tests/Mantis/). Since this is a core plugin, I would also suggest you put your tests there in the tests/Mantis/ directory, and not in a plugin-specific dir. Finally, I recommend you refactor your testHash() function to remove code duplication by using a PHPUnit data provider function. see example and reference documentation. |
|
Thank you @dregad, I was just confused why there is logic to check from the database
right, will move it to tests/Mantis directory.
right. |
|