Skip to content

Commit de29290

Browse files
committed
first
0 parents  commit de29290

File tree

112 files changed

+6211
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+6211
-0
lines changed

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
insert_final_newline = true
10+
indent_style = space
11+
indent_size = 4
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.yml]
18+
indent_size = 2

.gitattributes

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/art export-ignore
2+
/docs export-ignore
3+
/tests export-ignore
4+
/scripts export-ignore
5+
/.github export-ignore
6+
/.php_cs export-ignore
7+
.editorconfig export-ignore
8+
.gitattributes export-ignore
9+
.gitignore export-ignore
10+
.travis.yml export-ignore
11+
phpstan.neon export-ignore
12+
rector.yaml export-ignore
13+
phpunit.xml export-ignore
14+
CHANGELOG.md export-ignore
15+
CONTRIBUTING.md export-ignore
16+
README.md export-ignore

.github/FUNDING.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# These are supported funding model platforms
2+
3+
github: nunomaduro
4+
patreon: nunomaduro
5+
custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L

.github/workflows/ci.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Continuous Integration
2+
3+
on: ['push', 'pull_request']
4+
5+
jobs:
6+
ci:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
fail-fast: true
11+
matrix:
12+
php: [7.3, 7.4]
13+
dependency-version: [prefer-lowest, prefer-stable]
14+
15+
name: CI - PHP ${{ matrix.php }} (${{ matrix.dependency-version }})
16+
17+
steps:
18+
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Cache dependencies
23+
uses: actions/cache@v1
24+
with:
25+
path: ~/.composer/cache/files
26+
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
27+
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php }}
32+
extensions: mbstring, zip
33+
tools: prestissimo
34+
coverage: pcov
35+
36+
- name: Install Composer dependencies
37+
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
38+
39+
- name: Coding Style Checks
40+
run: |
41+
vendor/bin/rector process src --dry-run
42+
vendor/bin/php-cs-fixer fix -v --dry-run
43+
44+
- name: Type Checks
45+
run: vendor/bin/phpstan analyse --ansi
46+
47+
- name: Unit Tests
48+
run: bin/pest --colors=always --exclude-group=integration
49+
50+
- name: Integration Tests
51+
run: bin/pest --colors=always --group=integration

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.idea/*
2+
.idea/codeStyleSettings.xml
3+
composer.lock
4+
/vendor/
5+
coverage.xml
6+
.phpunit.result.cache
7+
.php_cs.cache
8+
.temp/coverage.php
9+
*.swp
10+
*.swo

.php_cs

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__ . DIRECTORY_SEPARATOR . 'tests')
5+
->in(__DIR__ . DIRECTORY_SEPARATOR . 'bin')
6+
->in(__DIR__ . DIRECTORY_SEPARATOR . 'compiled')
7+
->in(__DIR__ . DIRECTORY_SEPARATOR . 'scripts')
8+
->in(__DIR__ . DIRECTORY_SEPARATOR . 'stubs')
9+
->in(__DIR__ . DIRECTORY_SEPARATOR . 'src')
10+
->append(['.php_cs']);
11+
12+
$rules = [
13+
'@Symfony' => true,
14+
'phpdoc_no_empty_return' => false,
15+
'array_syntax' => ['syntax' => 'short'],
16+
'yoda_style' => false,
17+
'binary_operator_spaces' => [
18+
'operators' => [
19+
'=>' => 'align',
20+
'=' => 'align',
21+
],
22+
],
23+
'concat_space' => ['spacing' => 'one'],
24+
'not_operator_with_space' => false,
25+
];
26+
27+
$rules['increment_style'] = ['style' => 'post'];
28+
29+
return PhpCsFixer\Config::create()
30+
->setUsingCache(true)
31+
->setRules($rules)
32+
->setFinder($finder);

.temp/.gitkeep

Whitespace-only changes.

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/).
6+
7+
## [Unreleased]
8+
9+
## [v0.1]
10+
### Added
11+
- First version

CONTRIBUTING.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# CONTRIBUTING
2+
3+
Contributions are welcome, and are accepted via pull requests.
4+
Please review these guidelines before submitting any pull requests.
5+
6+
## Process
7+
8+
1. Fork the project
9+
1. Create a new branch
10+
1. Code, test, commit and push
11+
1. Open a pull request detailing your changes. Make sure to follow the [template](.github/PULL_REQUEST_TEMPLATE.md)
12+
13+
## Guidelines
14+
15+
* Please ensure the coding style running `composer lint`.
16+
* Send a coherent commit history, making sure each individual commit in your pull request is meaningful.
17+
* You may need to [rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) to avoid merge conflicts.
18+
* Please remember that we follow [SemVer](http://semver.org/).
19+
20+
## Setup
21+
22+
Clone your fork, then install the dev dependencies:
23+
```bash
24+
composer install
25+
```
26+
## Lint
27+
28+
Lint your code:
29+
```bash
30+
composer lint
31+
```
32+
## Tests
33+
34+
Run all tests:
35+
```bash
36+
composer test
37+
```
38+
39+
Check types:
40+
```bash
41+
composer test:types
42+
```
43+
44+
Unit tests:
45+
```bash
46+
composer test:unit
47+
```
48+
49+
Integration tests:
50+
```bash
51+
composer test:integration
52+
```

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Nuno Maduro <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<p align="center">
2+
<img src="https://next.pestphp.com/assets/img/og.png" width="600" alt="PEST Preview">
3+
<p align="center">
4+
<a href="https://github.com/pestphp/pest/actions"><img src="https://github.com/pest/pestphp/workflows/tests/badge.svg" alt="Build Status"></a>
5+
<a href="https://packagist.org/packages/pestphp/pest"><img src="https://poser.pugx.org/pestphp/pest/d/total.svg" alt="Total Downloads"></a>
6+
<a href="https://packagist.org/packages/pestphp/pest"><img src="https://poser.pugx.org/pestphp/pest/v/stable.svg" alt="Latest Version"></a>
7+
<a href="https://packagist.org/packages/pestphp/pest"><img src="https://poser.pugx.org/pestphp/pest/license.svg" alt="License"></a>
8+
</p>
9+
</p>
10+
11+
------
12+
**Pest** it's an elegant PHP Testing Framework with a focus on simplicity. It was carefully crafted to bring the joy of testing to PHP.
13+
14+
- Explore the docs: **[pestphp.com »](https://pestphp.com)**
15+
- Join the Discord Server: **[discord.gg/4UMHUb5 »](https://discord.gg/4UMHUb5)**
16+
17+
Pest was created by **[Nuno Maduro](https://twitter.com/enunomaduro)** and is open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.

bin/pest

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env php
2+
<?php declare(strict_types=1);
3+
4+
use Pest\Actions\ValidatesEnvironment;
5+
use Pest\Console\Command;
6+
use Pest\TestSuite;
7+
use Symfony\Component\Console\Output\ConsoleOutput;
8+
9+
(static function () {
10+
// Used when Pest is required using composer.
11+
$vendorPath = realpath(__DIR__ . '/../../../../vendor/autoload.php');
12+
13+
// Used when Pest maintainers are running Pest tests.
14+
$localPath = realpath(__DIR__ . '/../vendor/autoload.php');
15+
16+
if ($vendorPath) {
17+
include_once $vendorPath;
18+
} else {
19+
include_once $localPath;
20+
}
21+
22+
(new \NunoMaduro\Collision\Provider)->register();
23+
24+
$rootPath = getcwd();
25+
26+
$testSuite = TestSuite::getInstance($rootPath);
27+
28+
ValidatesEnvironment::in($testSuite);
29+
30+
exit((new Command($testSuite, new ConsoleOutput()))->run($_SERVER['argv']));
31+
})();

compiled/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)