3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * This is a simple test to make sure that you have phpunit
16 * correctly installed and working. The call will look something like:
19 * scripts/phpunit HelloTest
22 * If your script (which would need to be in HelloTest.php) is found and runs,
29 class HelloTest
extends PHPUnit\Framework\TestCase
{
31 * contains the object handle of the string class
37 * Called before the test functions will be executed.
38 * this function is defined in PHPUnit_TestCase and overwritten
41 public function setUp(): void
{
42 // create a new instance of String with the
48 * Called after the test functions are executed.
49 * this function is defined in PHPUnit_TestCase and overwritten
52 public function tearDown(): void
{
53 // delete your instance
58 * test the toString function.
60 public function testHello(): void
{
62 $this->assertEquals('hello', $result);