In PHPUnit-testing, it is often encountered a code which depends on internal PHP functions like phpversion(). Approach to testing is described in the current article.

Let us consider as a simple examle a class which checks current PHP version and tells if it satisfies requirements.


Cyr-To-Lat plugin, in which development we take active participation, grew recently to more than 100,000 active installs. In the last 10 months it grew by 30% (from 70,000 active installs).

New impulse to the popularity of the plugin gave such features as:

  • Increased number of transliteration languages (now it is Russian, Belorussian, Ukrainian, Bulgarian, Macedonian, Georgian, Kazakh, and Hebrew.
  • Friendly interface of transliteration tables
  • Conversion of any number of existing post, page, and term slugs in background processes
  • WP-CLI support
  • Reliable code, with 100% test coverage

In the nearest plans – support of Serbian, Turkmen, and Chinese languages, official WPML compatibility status, performance improvement.