Skip to content

Commit c6cf073

Browse files
committed
docs: add explanation about improving tests speed for users projects
1 parent 9b50586 commit c6cf073

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/references/testing.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,16 @@ class ActionsTest extends TestCase
3333
}
3434
}
3535
```
36+
37+
## Improving the Speed of Running Tests
38+
39+
By default, the Shield has set the `Config\Auth::$hashCost = 12` due to the greater security of passwords. However, to increase the test execution time, we have set the `$hashCost = 4` for the test environment.
40+
41+
If you use Shield in your project and your tests execution time is high, just set the `$hashCost = 4` in file **phpunit.xml.dist** of your project as follows:
42+
43+
```
44+
<php>
45+
<!-- Set hashCost for improving the speed of running tests -->
46+
<env name="auth.hashCost" value="4"/>
47+
</php>
48+
```

0 commit comments

Comments
 (0)