https://github.com/eniehack/phpunit-primer
a repository to introduce phpunit
https://github.com/eniehack/phpunit-primer
Last synced: about 1 year ago
JSON representation
a repository to introduce phpunit
- Host: GitHub
- URL: https://github.com/eniehack/phpunit-primer
- Owner: eniehack
- Created: 2022-07-18T02:13:04.000Z (almost 4 years ago)
- Default Branch: trunk
- Last Pushed: 2022-08-27T16:20:47.000Z (almost 4 years ago)
- Last Synced: 2025-02-13T06:41:18.943Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
#+title: PHPUnit Primer
#+options: toc:nil
* PHPUnit Primer
a repository for workshop to learn how to use PHPUnit, for nikkiame developer.
** 対象とする人
- PHP の経験が少ない人
- テストの経験が少ない人
** 流れ
1. =git clone https://github.com/eniehack/phpunit-primer.git= を実行する
2. =cd phpunit-primer=
3. =composer install=
4. =./vendor/bin/phpunit=
5. ~src/Sample/Sample.php~ と ~tests/Sample/SampleTest.php~ を見比べて、テストの書き方をなんとなく感じる
6. 各仕様(~src/*/README~)ごとに実装する
** 意識すること
- Red-Green のサイクルを回す
- 小さく生んで大きく育てる
- テストは最小限に
- クリアしたら、テストを 1 つ加えるを繰り返す
- 実装も、テストをパスできる程度(最小限)に