Skip to content

Commit a03b560

Browse files
KotaroSugawaraKotaroSugawara
KotaroSugawara
authored and
KotaroSugawara
committed
Created phpunit boilerplate project
1 parent 4946372 commit a03b560

10 files changed

+1670
-0
lines changed

.gitignore

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
2+
# Created by https://www.gitignore.io/api/linux,macos,windows,composer
3+
4+
### Composer ###
5+
composer.phar
6+
/vendor/
7+
8+
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
9+
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
10+
# composer.lock
11+
12+
### Linux ###
13+
*~
14+
15+
# temporary files which can be created if a process still has a handle open of a deleted file
16+
.fuse_hidden*
17+
18+
# KDE directory preferences
19+
.directory
20+
21+
# Linux trash folder which might appear on any partition or disk
22+
.Trash-*
23+
24+
# .nfs files are created when an open file is removed but is still being accessed
25+
.nfs*
26+
27+
### macOS ###
28+
*.DS_Store
29+
.AppleDouble
30+
.LSOverride
31+
32+
# Icon must end with two \r
33+
Icon
34+
35+
# Thumbnails
36+
._*
37+
38+
# Files that might appear in the root of a volume
39+
.DocumentRevisions-V100
40+
.fseventsd
41+
.Spotlight-V100
42+
.TemporaryItems
43+
.Trashes
44+
.VolumeIcon.icns
45+
.com.apple.timemachine.donotpresent
46+
47+
# Directories potentially created on remote AFP share
48+
.AppleDB
49+
.AppleDesktop
50+
Network Trash Folder
51+
Temporary Items
52+
.apdisk
53+
54+
### Windows ###
55+
# Windows thumbnail cache files
56+
Thumbs.db
57+
ehthumbs.db
58+
ehthumbs_vista.db
59+
60+
# Folder config file
61+
Desktop.ini
62+
63+
# Recycle Bin used on file shares
64+
$RECYCLE.BIN/
65+
66+
# Windows Installer files
67+
*.cab
68+
*.msi
69+
*.msm
70+
*.msp
71+
72+
# Windows shortcuts
73+
*.lnk
74+
75+
76+
# End of https://www.gitignore.io/api/linux,macos,windows,composer

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: php
2+
3+
php:
4+
- 7.1
5+
6+
before_script:
7+
- make install
8+
9+
script:
10+
- make test

Makefile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ifdef TRAVIS
2+
PHP := php
3+
COMPOSER := composer
4+
else
5+
PHP := docker-compose run php php
6+
COMPOSER := docker-compose run composer composer
7+
endif
8+
9+
all: install test
10+
.PHONY: all
11+
12+
install:
13+
$(COMPOSER) install
14+
.PHONY: install
15+
16+
test:
17+
$(PHP) ./vendor/bin/phpunit
18+
.PHONY: test

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# TDD PHP Example
2+
3+
[![Build Status](https://travis-ci.org/kotarella1110/tdd-php-example.svg?branch=master)](https://travis-ci.org/kotarella1110/tdd-php-example)
4+
5+
This repository is examples of [Test Driven Development: By Example (Kent Beck)](https://www.amazon.co.jp/%E3%83%86%E3%82%B9%E3%83%88%E9%A7%86%E5%8B%95%E9%96%8B%E7%99%BA-Kent-Beck/dp/4274217884/) in PHP .
6+
7+
## Quick Start
8+
9+
```shell
10+
$ make
11+
```
12+
13+
## Install
14+
15+
```shell
16+
$ make install
17+
```
18+
19+
## Test
20+
21+
```shell
22+
$ make test
23+
```

composer.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "kotarella1110/tdd-php-example",
3+
"require": {
4+
"php": "^7.1"
5+
},
6+
"require-dev": {
7+
"phpunit/phpunit": "^7.0"
8+
},
9+
"autoload": {
10+
"psr-4": {
11+
"TDD\\": "src/"
12+
}
13+
},
14+
"autoload-dev": {
15+
"psr-4": {
16+
"TDD\\Tests\\": "tests/"
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)