1 | <?php |
||
8 | class GameDeliveryTest extends AbstractAPITest |
||
9 | { |
||
10 | private static $gameDeliveryEntityId; |
||
11 | |||
12 | private static $gameDeliveryEntitySku; |
||
13 | |||
14 | private $gameDeliveryEntityTemplate; |
||
15 | |||
16 | public function setUp() |
||
41 | |||
42 | public function testListGameDeliveryDrmPlatforms() |
||
48 | |||
49 | public function testCreateGameDeliveryEntity() |
||
50 | { |
||
51 | $response = $this->xsollaClient->CreateGameDeliveryEntity(array( |
||
52 | 'project_id' => $this->projectId, |
||
53 | 'request' => $this->gameDeliveryEntityTemplate, |
||
54 | )); |
||
55 | static::assertArrayHasKey('id', $response); |
||
56 | static::$gameDeliveryEntityId = $response['id']; |
||
|
|||
57 | static::$gameDeliveryEntitySku = $this->gameDeliveryEntityTemplate['sku']; |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @depends testCreateGameDeliveryEntity |
||
62 | */ |
||
63 | public function testListGameDeliveryEntities() |
||
71 | |||
72 | /** |
||
73 | * @depends testCreateGameDeliveryEntity |
||
74 | */ |
||
75 | public function testGetGameDeliveryEntity() |
||
84 | |||
85 | /** |
||
86 | * @depends testCreateGameDeliveryEntity |
||
87 | */ |
||
88 | public function testUpdateGameDeliveryEntity() |
||
96 | } |
||
97 |
Let’s assume you have a class which uses late-static binding:
The code above will run fine in your PHP runtime. However, if you now create a sub-class and call the
getSomeVariable()
on that sub-class, you will receive a runtime error:In the case above, it makes sense to update
SomeClass
to useself
instead: