Skip to content

Commit 800a2ad

Browse files
committed
Changed README. Added unit tests setup.
1 parent 0877931 commit 800a2ad

7 files changed

+1543
-2206
lines changed

README.md

+26-16
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
1-
# PHP Boilerplate
1+
# Autenticação Gov - PHP API
22

3-
A boilerplate for new composer based PHP projects.
3+
A PHP 7.1+ API to parse data from [autenticacao.gov.pt](https://www.autenticacao.gov.pt/) service. Autenticação Gov, such as the 'Chave Móvel Digital' (CMD), allows you to perform services and access the portals of various public and private entities, from business sectors such as Banking, Telecommunications, Energy, Health, Tourism, among others.
44

5-
## Getting started
5+
[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](http://www.opensource.org/licenses/MIT)
66

7-
```bash
8-
# With composer
9-
$ composer create-project kreait/php-boilerplate new-project
7+
## Instalation
8+
Library can be installed using Composer like so:
109

11-
# With git
12-
$ git clone [email protected]:kreait/php-boilerplate.git new-project && cd $_ && rm -rf .git && git init
10+
```shell
11+
$ composer require dipcode/authentication-gov
1312
```
1413

15-
### Update `composer.json`
14+
## Starting development
15+
Start by cloning the repo:
1616

17-
Replace the Namespaces in the `autoload` and `autoload-dev` sections with your project's namespaces
18-
and run `composer dump-autoload`.
17+
```shell
18+
$ git clone https://github.com/dipcode-software/authentication-gov.git
19+
$ cd authentication-gov
20+
```
21+
22+
Install the composer dependencies:
23+
```shell
24+
$ composer install
25+
```
1926

20-
### (Optional) Update `.gitattributes`
27+
### Running the tests
28+
To run tests, unit and style tests, just run:
2129

22-
Remove the comments in `.gitattributes` so that unneeded files for your package won't get included in your releases.
30+
```shell
31+
$ composer test
32+
```
2333

24-
### (Optional) Add `composer.lock` to the `.gitignore` file
34+
### Coding Style
2535

26-
If you're creating an application instead of a library, it is considered good practice to commit the `composer.lock` file together with the rest of the code.
36+
Largely PSR-2 compliant:
2737

28-
### Start coding! :smile:
38+
https://raw.githubusercontent.com/php-fig/fig-standards/master/accepted/PSR-2-coding-style-guide.md

composer.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.2.5",
15-
"guzzlehttp/guzzle": "^7.0"
14+
"php": "^7.1",
15+
"guzzlehttp/guzzle": "^6.0"
1616
},
1717
"require-dev": {
1818
"phpunit/phpunit": "^7.0",
@@ -28,9 +28,15 @@
2828
"Dipcode\\Unit\\": "tests/"
2929
}
3030
},
31+
"scripts": {
32+
"test": [
33+
"phpcs --standard=phpcs.xml",
34+
"phpunit -c phpunit.xml"
35+
]
36+
},
3137
"config": {
3238
"platform": {
33-
"php": "7.2.5"
39+
"php": "7.1"
3440
},
3541
"sort-packages": true
3642
}

0 commit comments

Comments
 (0)