We all know that PHPunit testing framework has been added into Drupal 8. More than that SimpleTest in Drupal 8 is deprecated now. PHP unit testing also helps you to check you business logic So let's learn and discuss about, how to write the PHPUnit test for our requirement.