-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(WPTestCase) add missing assertions, handle uploads removal
- Loading branch information
Showing
6 changed files
with
104 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
use lucatume\WPBrowser\TestCase\WPTestCase; | ||
|
||
/** | ||
* Class DynamicPropertyTest. | ||
* | ||
* @since TBD | ||
* | ||
* @package wploadersuite; | ||
*/ | ||
class DynamicPropertyTest extends WPTestCase | ||
{ | ||
/** | ||
* It should allow setting and getting a dynamic property on the test case | ||
* | ||
* @test | ||
*/ | ||
public function should_allow_setting_and_getting_a_dynamic_property_on_the_test_case(): void | ||
{ | ||
$this->assertFalse(isset($this->testDynamicProperty)); | ||
$this->assertNull($this->testDynamicProperty); | ||
|
||
$this->testDynamicProperty = 23; | ||
|
||
$this->assertTrue(isset($this->testDynamicProperty)); | ||
$this->assertEquals(23,$this->testDynamicProperty); | ||
|
||
$this->testDynamicProperty = 89; | ||
|
||
$this->assertTrue(isset($this->testDynamicProperty)); | ||
$this->assertEquals(89,$this->testDynamicProperty); | ||
|
||
unset($this->testDynamicProperty); | ||
|
||
$this->assertFalse(isset($this->testDynamicProperty)); | ||
$this->assertNull($this->testDynamicProperty); | ||
} | ||
} |