Skip to content

Commit

Permalink
Installed pestphp/pest
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling committed Apr 7, 2022
1 parent d40cd84 commit bad8b45
Show file tree
Hide file tree
Showing 4 changed files with 304 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Composer:
- [barryvdh/laravel-ide-helper](https://github.com/barryvdh/laravel-ide-helper) _(dev)_
- [laravel-lang/lang](https://github.com/laravel-lang/lang) _(dev)_
- [laravel-lang/publisher](https://github.com/laravel-lang/publisher) _(dev)_
- [pestphp/pest](https://github.com/pestphp/pest) _(dev)_

NPM:
- [prettier](https://github.com/prettier/prettier)
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"laravel/sail": "^1.13",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.2",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.1"
},
Expand Down
257 changes: 256 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions tests/Pest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

/*
|--------------------------------------------------------------------------
| Test Case
|--------------------------------------------------------------------------
|
| The closure you provide to your test functions is always bound to a specific PHPUnit test
| case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may
| need to change it using the "uses()" function to bind a different classes or traits.
|
*/

uses(Tests\TestCase::class)->in('Feature');

/*
|--------------------------------------------------------------------------
| Expectations
|--------------------------------------------------------------------------
|
| When you're writing tests, you often need to check that values meet certain conditions. The
| "expect()" function gives you access to a set of "expectations" methods that you can use
| to assert different things. Of course, you may extend the Expectation API at any time.
|
*/

expect()->extend('toBeOne', function () {
return $this->toBe(1);
});

/*
|--------------------------------------------------------------------------
| Functions
|--------------------------------------------------------------------------
|
| While Pest is very powerful out-of-the-box, you may have some testing code specific to your
| project that you don't want to repeat in every file. Here you can also expose helpers as
| global functions to help you to reduce the number of lines of code in your test files.
|
*/

function something()
{
// ..
}

0 comments on commit bad8b45

Please sign in to comment.