Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

Latest commit

 

History

History
46 lines (33 loc) · 831 Bytes

install.md

File metadata and controls

46 lines (33 loc) · 831 Bytes

安裝 PHPUnit

composer require phpunit/phpunit --dev

建立設定檔

vendor/bin/phpunit --generate-configuration

設定畫面(全部使用預設值即可)

PHPUnit 6.3.0 by Sebastian Bergmann and contributors.

Generating phpunit.xml in C:\Users\recca\UniServerZ\www\mockery_demo

Bootstrap script (relative to path shown above; default: vendor/autoload.php):
Tests directory (relative to path shown above; default: tests):
Source directory (relative to path shown above; default: src):

Generated phpunit.xml in C:\Users\recca\UniServerZ\www\mockery_demo

新增 tests, src 資料夾

增加 psr-4

修改 composer.json

{
    "autoload": {
        "psr-4": {
            "Acme\\": "src/"
        }
    }
}

執行

composer dump-autoload