-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace Orchestra\Testbench\Tests\Concerns; | ||
|
||
use Orchestra\Testbench\Concerns\HandlesAssertions; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class HandlesAssertionsTest extends TestCase | ||
{ | ||
use HandlesAssertions; | ||
|
||
/** @test */ | ||
public function it_should_mark_the_tests_as_skipped() | ||
{ | ||
$this->markTestSkippedWhen(true, 'Successfully skipped current test'); | ||
|
||
$this->assertTrue(false, 'Test incorrectly executed.'); | ||
} | ||
|
||
/** @test */ | ||
public function it_should_mark_the_tests_as_skipped_when_condition_() | ||
{ | ||
$this->markTestSkippedWhen(function () { | ||
return false; | ||
}, 'Failed skipped current test'); | ||
|
||
$this->assertTrue(true, 'Test is correctly executed.'); | ||
} | ||
} |