Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1dff970

Browse files
committedFeb 9, 2022
Changing extensions for default test classes
to ".dist".
1 parent b90a501 commit 1dff970

File tree

10 files changed

+17
-11
lines changed

10 files changed

+17
-11
lines changed
 

‎.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
/ci/phpunit/
33
/ci/phpunit.xml
44
/src/**/*.php
5-
!/src/Training/Easy/ASCIIArt/ASCIIArt.php
6-
!/src/Training/Easy/Defibrillators/Defibrillators.php
7-
!/src/Training/Easy/HorseRacingDuals/HorseRacingDuals.php
8-
!/src/Training/Easy/MIMEType/MIMEType.php
9-
!/src/Training/Easy/Temperatures/Temperatures.php
10-
!/src/Training/Easy/Unary/Unary.php
11-
!/src/Training/Medium/MayanCalculation/MayanCalculation.php
125
!/src/Puzzle.php
136
/tools/
147
/vendor/

‎CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.0.0] - 2022-02-09
8+
### Changed
9+
- Using "*.dist" files as default PHP templates.
10+
711
## [1.2.0] - 2022-02-09
812
### Added
913
- Tests for "Mayan calculation".

‎README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,26 @@ user@host codingame$ docker compose run --rm app phive install --trust-gpg-keys
2323
```
2424

2525

26-
## Usage
26+
## Add your code
2727

28-
Every classes in `./src/` contains an `execute()` method with the default Codingame code.
29-
You can add every PHP code you want in this directory to solve the puzzles.
28+
Every classes in `./src/**/*.dist` files have an `execute()` method with the default Codingame code.
29+
To try a puzzle, copy the corresponding file and change the extension to `php` :
30+
```shellsession
31+
user@host codingame$ cp ./src/Training/Easy/Unary/Unary.dist ./src/Training/Easy/Unary/Unary.php
32+
```
33+
Then, add your code to solve the puzzle.
34+
35+
**If you change the class name or do not have an `execute()` method in it, the tests will not be able to run.**
36+
37+
38+
## Test your solution
3039

3140
Executing all the tests :
3241
```shellsession
3342
user@host codingame$ docker compose run --rm app ./tools/phpunit -c ./ci/phpunit.dist.xml
3443
```
3544

36-
Executing tests for a particular puzzle :
45+
Executing tests for a particular puzzle or a test case :
3746
```shellsession
3847
user@host codingame$ docker compose run --rm app ./tools/phpunit -c ./ci/phpunit.dist.xml --group [GROUP_NAME]
3948
```

0 commit comments

Comments
 (0)
Please sign in to comment.