浏览代码

Use pest for tests

Daniel Supernault 1 月之前
父节点
当前提交
71e3fa7aff
共有 4 个文件被更改,包括 914 次插入140 次删除
  1. 5 2
      composer.json
  2. 899 138
      composer.lock
  3. 5 0
      tests/Pest.php
  4. 5 0
      tests/Unit/ExampleTest.php

+ 5 - 2
composer.json

@@ -53,7 +53,7 @@
         "laravel/telescope": "^5.5",
         "mockery/mockery": "^1.6",
         "nunomaduro/collision": "^8.8",
-        "phpunit/phpunit": "^11.0.1"
+        "pestphp/pest": "^3.8"
     },
     "autoload": {
         "classmap": [
@@ -100,7 +100,10 @@
     "config": {
         "preferred-install": "dist",
         "sort-packages": true,
-        "optimize-autoloader": true
+        "optimize-autoloader": true,
+        "allow-plugins": {
+            "pestphp/pest-plugin": true
+        }
     },
     "prefer-stable": true
 }

文件差异内容过多而无法显示
+ 899 - 138
composer.lock


+ 5 - 0
tests/Pest.php

@@ -0,0 +1,5 @@
+<?php
+
+expect()->extend('toBeOne', function () {
+    return $this->toBe(1);
+});

+ 5 - 0
tests/Unit/ExampleTest.php

@@ -0,0 +1,5 @@
+<?php
+
+test('that true is true', function () {
+    expect(true)->toBeTrue();
+});

部分文件因为文件数量过多而无法显示