Drupal testing framework (PHPUnit) provide 3 types of tests: UnitTest, KernelTest, FunctionalTest (JSFunctionalTest)
UnitTest : Very fast but Unit Only, without drupal.
KernelTest : Is a service test with drupal but without interfaces ans theming.
Tutorials - Drupal
By nuwantha, 1 June, 2022
By editor, 8 March, 2022
By editor, 12 January, 2022
By editor, 23 November, 2021
By editor, 4 November, 2021
By editor, 3 November, 2021
By editor, 30 September, 2021
PHP Class using StringTranslationTrait
StringTranslationTrait allow to get t() and formatPlural() methods
Example:
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
class MyClass {
By editor, 24 June, 2021
By editor, 15 June, 2021