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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
26 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 ...
DeesreX's user avatar
  • 87
2 votes
0 answers
46 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 ...
Huw Evans's user avatar
  • 371
1 vote
1 answer
51 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 ...
glenatron's user avatar
  • 239
2 votes
1 answer
91 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 ...
Olle Härstedt's user avatar
1 vote
0 answers
169 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....
DrGeneral's user avatar
  • 111