Skip to main content

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
2 votes
1 answer

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
2 votes
0 answers

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

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
1 vote
0 answers

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
1 vote
0 answers

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