-
-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f291cd1
commit a55da85
Showing
13 changed files
with
99 additions
and
9 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
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
2 changes: 1 addition & 1 deletion
2
tests/.pest/snapshots/Visual/Help/visual_snapshot_of_help_command_output.snap
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
Pest Testing Framework 3.1.0. | ||
Pest Testing Framework 3.2.0. | ||
|
||
USAGE: pest <file> [options] | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
tests/.pest/snapshots/Visual/Version/visual_snapshot_of_help_command_output.snap
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
Pest Testing Framework 3.1.0. | ||
Pest Testing Framework 3.2.0. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
use Pest\Arch\Exceptions\ArchExpectationFailedException; | ||
|
||
test('missing strict equality') | ||
->throws(ArchExpectationFailedException::class) | ||
->expect('Tests\\Fixtures\\Arch\\ToUseStrictEquality\\NotStrictEquality') | ||
->toUseStrictEquality(); | ||
|
||
test('has strict equality') | ||
->expect('Tests\\Fixtures\\Arch\\ToUseStrictEquality\\StrictEquality') | ||
->toUseStrictEquality(); | ||
|
||
test('opposite missing strict equality') | ||
->throws(ArchExpectationFailedException::class) | ||
->expect('Tests\\Fixtures\\Arch\\ToUseStrictEquality\\StrictEquality') | ||
->not->toUseStrictEquality(); | ||
|
||
test('opposite has strict equality') | ||
->expect('Tests\\Fixtures\\Arch\\ToUseStrictEquality\\NotStrictEquality') | ||
->not->toUseStrictEquality(); |
18 changes: 18 additions & 0 deletions
18
tests/Fixtures/Arch/ToUseStrictEquality/NotStrictEquality.php
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,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\Fixtures\Arch\ToUseStrictEquality; | ||
|
||
class NotStrictEquality | ||
{ | ||
public function test(): void | ||
{ | ||
$a = 1; | ||
$b = '1'; | ||
|
||
if ($a == $b) { | ||
echo 'Equal'; | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
tests/Fixtures/Arch/ToUseStrictEquality/StrictEquality.php
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,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\Fixtures\Arch\ToUseStrictEquality; | ||
|
||
class StrictEquality | ||
{ | ||
public function test(): void | ||
{ | ||
$a = 1; | ||
$b = '1'; | ||
|
||
if ($a === $b) { | ||
echo 'Equal'; | ||
} | ||
} | ||
} |
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