Skip to main content
added 142 characters in body
Source Link
user49
user49

The point is unit testing. You can extend the class and override t() or just create a mock out of it. Global functions are not available during PHPUnit runs and in general just a pain.

Since this became so popular let me link the relevant handbook page on global functions and unit tests.

The point is unit testing. You can extend the class and override t() or just create a mock out of it. Global functions are not available during PHPUnit runs and in general just a pain.

The point is unit testing. You can extend the class and override t() or just create a mock out of it. Global functions are not available during PHPUnit runs and in general just a pain.

Since this became so popular let me link the relevant handbook page on global functions and unit tests.

Source Link
user49
user49

The point is unit testing. You can extend the class and override t() or just create a mock out of it. Global functions are not available during PHPUnit runs and in general just a pain.