1 | <?php |
||
22 | class InstallContext implements Context |
||
23 | { |
||
24 | use CommonContextTrait; |
||
25 | |||
26 | static private $configFile; |
||
27 | |||
28 | static private $yawikGlobalConfig; |
||
29 | |||
30 | static private $yawikBackupConfig; |
||
31 | |||
32 | public function __construct() |
||
38 | |||
39 | /** |
||
40 | * @Given I have install module activated |
||
41 | */ |
||
42 | public function iHaveInstallModuleActivated() |
||
59 | |||
60 | /** |
||
61 | * @Given I go to the install page |
||
62 | */ |
||
63 | public function iGoToInstallPage() |
||
69 | |||
70 | /** |
||
71 | * @AfterSuite |
||
72 | */ |
||
73 | static public function tearDown() |
||
77 | |||
78 | /** |
||
79 | * @AfterScenario |
||
80 | */ |
||
81 | public function afterScenario() |
||
85 | |||
86 | /** |
||
87 | * @BeforeSuite |
||
88 | */ |
||
89 | static public function setUp() |
||
93 | |||
94 | static public function restoreConfig() |
||
108 | |||
109 | /** |
||
110 | * @Given I fill database connection with an active connection |
||
111 | */ |
||
112 | public function iFillActiveConnectionString() |
||
118 | } |
||
119 |
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: