@@ -54,7 +54,7 @@ Write the tests in a CSV file ready for import.
5454
5555Default options are:
5656
57- - rows: ` 5 `
57+ - rows: ` null ` (all the tests)
5858- file: ` phpunit_results.csv `
5959
6060## Json
@@ -67,7 +67,7 @@ Write the tests in a JSON file ready for import.
6767
6868Default options are:
6969
70- - rows: ` 5 `
70+ - rows: ` null ` (all the tests)
7171- file: ` phpunit_results.json `
7272
7373### MySQL
@@ -80,7 +80,7 @@ Store the test name and the time into a MySQL database. It will override existin
8080
8181Default credentials are (as array):
8282
83- - rows: ` 5 `
83+ - rows: ` null ` (all the tests)
8484- database: ` phpunit_results `
8585- table: ` default `
8686- username: ` root `
@@ -97,10 +97,52 @@ Store the test name and the time into a SQLite database. It will override existi
9797
9898Default credentials are (as array):
9999
100- - rows: ` 5 `
100+ - rows: ` null ` (all the tests)
101101- database: ` phpunit_results.db `
102102- table: ` default `
103103
104+ ## Arguments
105+
106+ To override the default configuration per extension, you need to use ` <arguments> ` in your ` phpunit.xml ` file
107+
108+ ``` xml
109+ <extension class =" Lloople\PHPUnitExtensions\Runners\SlowestTests\Json" >
110+ <arguments >
111+ <integer >10</integer >
112+ <string >phpunit_results_as_json.json</string >
113+ </arguments >
114+ </extension >
115+ ```
116+
117+ In the case of the MySQL and SQLite, which needs a database connection, configuration goes as array
118+
119+ <extension class =" Lloople\PHPUnitExtensions\Runners\SlowestTests\MySQL " >
120+ <arguments >
121+ <null/> <!-- This allows you to log all the tests -->
122+ <array>
123+ <element key="database">
124+ <string>my_phpunit_results</string>
125+ </element>
126+ <element key="table">
127+ <string>project1_test_results</string>
128+ </element>
129+ <element key="username">
130+ <string>homestead</string>
131+ </element>
132+ <element key="password">
133+ <string>secret</string>
134+ </element>
135+ <element key="host">
136+ <string>192.168.12.14</string>
137+ </element>
138+ </array>
139+ </arguments >
140+ </extension >
141+ ```
142+
143+ You don't need to override those credentials that already fit to your
144+ usecase, since the class will merge your configuration with the default one
145+
104146### Changelog
105147
106148Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
0 commit comments