Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. use Illuminate\Foundation\Testing\RefreshDatabase;
  3. use Tests\TestCase;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Test Case
  7. |--------------------------------------------------------------------------
  8. |
  9. | The closure you provide to your test functions is always bound to a specific PHPUnit test
  10. | case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may
  11. | need to change it using the "uses()" function to bind a different classes or traits.
  12. |
  13. */
  14. uses(TestCase::class, RefreshDatabase::class)->in('Feature');
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Expectations
  18. |--------------------------------------------------------------------------
  19. |
  20. | When you're writing tests, you often need to check that values meet certain conditions. The
  21. | "expect()" function gives you access to a set of "expectations" methods that you can use
  22. | to assert different things. Of course, you may extend the Expectation API at any time.
  23. |
  24. */
  25. expect()->extend('toBeOne', function () {
  26. return $this->toBe(1);
  27. });
  28. /*
  29. |--------------------------------------------------------------------------
  30. | Functions
  31. |--------------------------------------------------------------------------
  32. |
  33. | While Pest is very powerful out-of-the-box, you may have some testing code specific to your
  34. | project that you don't want to repeat in every file. Here you can also expose helpers as
  35. | global functions to help you to reduce the number of lines of code in your test files.
  36. |
  37. */
  38. function something()
  39. {
  40. // ..
  41. }