Merge pull request #19859 from civicrm/5.36
[civicrm-core.git] / tests / phpunit / HelloTest.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
10 */
11
12 /**
13 * @file HelloTest.php
14 *
15 * This is a simple test to make sure that you have phpunit
16 * correctly installed and working. The call will look something like:
17 *
18 * <code>
19 * scripts/phpunit HelloTest
20 * </code>
21 *
22 * If your script (which would need to be in HelloTest.php) is found and runs,
23 * UR DOIN IT RIGHT!
24 */
25
26 /**
27 * Class HelloTest
28 */
29 class HelloTest extends PHPUnit\Framework\TestCase {
30 /**
31 * contains the object handle of the string class
32 * @var string
33 */
34 public $abc;
35
36 /**
37 * Called before the test functions will be executed.
38 * this function is defined in PHPUnit_TestCase and overwritten
39 * here
40 */
41 public function setUp() {
42 // create a new instance of String with the
43 // string 'abc'
44 $this->abc = 'hello';
45 }
46
47 /**
48 * Called after the test functions are executed.
49 * this function is defined in PHPUnit_TestCase and overwritten
50 * here.
51 */
52 public function tearDown(): void {
53 // delete your instance
54 unset($this->abc);
55 }
56
57 /**
58 * test the toString function.
59 */
60 public function testHello(): void {
61 $result = $this->abc;
62 $this->assertEquals('hello', $result);
63 }
64
65 }