Skip to content

Commit 82e7881

Browse files
committed
docs(README): Add configuration example
1 parent 94e0da2 commit 82e7881

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<a href="#installation"><img alt="TESTO"
2+
<a href="#get-started"><img alt="TESTO"
33
src="https://github.com/php-testo/.github/blob/1.x/resources/logo-full.svg?raw=true"
44
style="width: 2in; display: block"
55
/></a>
@@ -16,7 +16,9 @@
1616

1717
<br />
1818

19-
## Installation
19+
## Get Started
20+
21+
### Installation
2022

2123
```bash
2224
composer require testo/testo
@@ -27,6 +29,33 @@ composer require testo/testo
2729
[![License](https://img.shields.io/packagist/l/testo/testo.svg?style=flat-square)](LICENSE.md)
2830
[![Total Destroys](https://img.shields.io/packagist/dt/testo/testo.svg?style=flat-square)](https://packagist.org/packages/testo/testo/stats)
2931

32+
### Configuration
33+
34+
By default, if no configuration file is provided, Testo will run tests from the `tests` folder.
35+
36+
To customize the configuration, create a `testo.php` file in the root of your project:
37+
38+
```php
39+
<?php
40+
41+
declare(strict_types=1);
42+
43+
use Testo\Config\ApplicationConfig;
44+
use Testo\Config\SuiteConfig;
45+
use Testo\Config\FinderConfig;
46+
47+
return new ApplicationConfig(
48+
suites: [
49+
new SuiteConfig(
50+
name: 'Unit',
51+
location: new FinderConfig(
52+
include: ['tests/Unit'],
53+
),
54+
),
55+
],
56+
);
57+
```
58+
3059
## IDE Support
3160

3261
Testo comes with the [IDEA plugin `Testo`](https://plugins.jetbrains.com/plugin/28842-testo?noRedirect=true).

0 commit comments

Comments
 (0)