View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022231 | mantisbt | markdown | public | 2017-01-22 18:15 | 2024-09-29 13:15 |
Reporter | vboctor | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 2.1.0 | ||||
Target Version | 2.27.0 | Fixed in Version | 2.27.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. |
|
MantisBT: master 8b23f272 2024-03-27 09:47 grummbeer Committer: dregad Details Diff |
Add tests for MantisCoreFormatting plugin Fixes 0022231, PR https://github.com/mantisbt/mantisbt/pull/1976 |
Affected Issues 0022231 |
|
mod - phpunit.xml | Diff File | ||
mod - plugins/MantisCoreFormatting/tests/MarkdownTest.php | Diff File | ||
MantisBT: master 3aec6e68 2024-03-31 23:15 grummbeer Committer: dregad Details Diff |
Clean up markdown processing - Process input via Markdownparser and return the result, no further text processing. - During parsing, catch all <code> blocks and replace them with a hash value. - After the markup is returned from Parsedown, apply mentions and links - Restore the untouched <code> Blocks back in place. Fixes 0034040, PR https://github.com/mantisbt/mantisbt/pull/1976 Also fixes 0022315, 0022320, 0024241, 0024628, 0024810, 0022231, 0023738 Signed-off-by: Damien Regad <dregad@mantisbt.org> |
Affected Issues 0022231, 0022315, 0022320, 0023738, 0024241, 0024628, 0024810, 0034040, 0034393 |
|
mod - plugins/MantisCoreFormatting/MantisCoreFormatting.php | Diff File | ||
mod - plugins/MantisCoreFormatting/core/MantisMarkdown.php | Diff File |