1 | <?php |
||
8 | abstract class AbstractAPITest extends \PHPUnit_Framework_TestCase |
||
9 | { |
||
10 | /** |
||
11 | * @var XsollaClient |
||
12 | */ |
||
13 | protected static $xsollaClient; |
||
14 | |||
15 | /** |
||
16 | * @var int |
||
17 | */ |
||
18 | protected static $projectId; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | protected static $merchantId; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected static $userId; |
||
29 | |||
30 | public static function setUpBeforeClass() |
||
37 | } |
||
38 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: