Skip to content
Mitsuru Mutaguchi edited this page Feb 21, 2024 · 12 revisions

phpunitは、テストツールです。

前作業

  1. Connect-CMSの最新版にアップデートする
  2. 開発ライブラリ(phpunit等)を入れる

phpunit実行

// プロジェクトルートへ移動
cd /path/to/laravel

// phpunit実行
./vendor/bin/phpunit

// composerコマンドでphpunit実行(上記と同等)
composer phpunit
// or
php composer.phar phpunit

// composerコマンドで任意のファイルでphpunit実行(下記パス指定は例です。任意に変更してください)
composer phpunit -- -v tests\Unit\Migration\MigrationTraitTest.php

// artisanコマンドでphpunit実行
php artisan test

// artisanコマンドで任意のファイルのphpunit実行
php artisan test tests\Unit\Migration\MigrationTraitTest.php

テストケースディレクトリ

参考リンク

Clone this wiki locally