Questions tagged [unit-testing]
Unit testing is a method by which individual units of source code are tested to determine if they are fit for use.
5
questions
1
vote
0
answers
32
views
Where are the Joomla tests located, and how can I include them in my CI/CD pipeline?
I am trying to set up a CI/CD pipeline for a Joomla project and would like to include tests for my Joomla components. I am looking for the location of the Joomla tests and how I can integrate them ...
2
votes
0
answers
48
views
Unit tests for Joomla 3 plugin
I have written some moderately complicated software for my Joomla site and want to improve on my code base in coming releases.
To this end I am writing some unit tests however it's hard to run the ...
1
vote
1
answer
52
views
How do I unit test component methods that use the logger?
I have unit tests running for my component (using a bootstrap file to get the usual requirements) but as soon as I add any logging, I get:
Class '\Joomla\CMS\Log\Log' not found`
I have tried ...
2
votes
1
answer
93
views
Overwrite the global database driver
JFactory has a getDbo method, but no setDbo. Why? It can be useful for unit-testing to be able to overwrite the global database driver. Any other way to do this?
EDIT: $database is a public property ...
1
vote
0
answers
170
views
JComponentRouterView not found .... when unit testing Joomla
I want to start unit testing my own joomla library and components. So I downloaded tests folder and phpunit.dist.xml file from Github. Then I copied those files to joomla directory(renamed phpunit.xml....