您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Pest.php 1.0KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. uses(Tests\TestCase::class)
  3. ->in('Feature', 'Unit');
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Expectations
  7. |--------------------------------------------------------------------------
  8. |
  9. | When you're writing tests, you often need to check that values meet certain conditions. The
  10. | "expect()" function gives you access to a set of "expectations" methods that you can use
  11. | to assert different things. Of course, you may extend the Expectation API at any time.
  12. |
  13. */
  14. expect()->extend('toBeOne', function () {
  15. return $this->toBe(1);
  16. });
  17. /*
  18. |--------------------------------------------------------------------------
  19. | Functions
  20. |--------------------------------------------------------------------------
  21. |
  22. | While Pest is very powerful out-of-the-box, you may have some testing code specific to your
  23. | project that you don't want to repeat in every file. Here you can also expose helpers as
  24. | global functions to help you to reduce the number of lines of code in your test files.
  25. |
  26. */
  27. function something()
  28. {
  29. // ..
  30. }