Skip to content

Commit 8fd3b1d

Browse files
committed
Renaming test files to "CGTest.php".
1 parent 43fbbd0 commit 8fd3b1d

File tree

30 files changed

+46
-42
lines changed

30 files changed

+46
-42
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
/src/**/*.php
55
!/src/Puzzle.php
66
/tests/**/*.php
7-
!/tests/**/*.dist.php
7+
!/tests/**/CGTest.php
88
/tools/
99
/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+
## [Unreleased]
8+
### Changed
9+
- Renamed all test files to "CGTest.php".
10+
711
## [2.8.0] - 2022-02-14
812
### Added
913
- Possibility to add tests that do not come from Codingame.

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Codingame
1+
# CodinGame
22

3-
A project to test your [Codingame](https://www.codingame.com/) PHP code. It is not intended to have solutions.
4-
It only contains PHPUnit tests to let you code in your favorite IDE, outside of the Codingame web site.
3+
A project to test your [CodinGame](https://www.codingame.com/) PHP code. It is not intended to have solutions.
4+
It only contains PHPUnit tests to let you code in your favorite IDE, outside of the CodinGame web site.
55

66
[![License](https://img.shields.io/github/license/cyrilverloop/codingame-php-tests)](https://github.com/cyrilverloop/codingame-php-tests/blob/trunk/LICENSE)
77
[![PHP version](https://img.shields.io/badge/php-%3D7.3-%23777BB4?logo=php&style=flat)](https://www.php.net/)
@@ -25,7 +25,7 @@ user@host codingame-php-tests$ docker compose run --rm app phive install --trust
2525

2626
## Add your code
2727

28-
Every classes in `./src/**/*.dist` files have an `execute()` method with the default Codingame code.
28+
Every classes in `./src/**/*.dist` files have an `execute()` method with the default CodinGame code.
2929
To try a puzzle, copy the corresponding file and change the extension to `php` :
3030
```shellsession
3131
user@host codingame-php-tests$ cp ./src/Training/Easy/Unary/Unary.dist ./src/Training/Easy/Unary/Unary.php
@@ -35,12 +35,6 @@ Then, add your code to solve the puzzle.
3535
**If you change the class name or do not have an `execute()` method in it, the tests will not be able to run.**
3636

3737

38-
## Add your test (optional)
39-
40-
Every tests in `./tests/**/*Test.dist.php` files include the tests from Codingame.
41-
You can add your own tests in `./tests/**/*Test.php` files.
42-
43-
4438
## Test your solution
4539

4640
Executing all the tests :
@@ -59,22 +53,28 @@ user@host codingame-php-tests$ docker compose run --rm app ./tools/phpunit -c ./
5953
```
6054

6155

62-
## Back to Codingame
56+
## Add your test (optional)
57+
58+
Every tests in `./tests/**/CGTest.php` files include the tests from CodinGame.
59+
You can add your own tests in other `./tests/**/*Test.php` files and add them to a group with the `@group` annotation.
60+
61+
62+
## Back to CodinGame
6363

64-
When you copy your code back to Codingame, you must change every `$stdin` in `fscanf()`, `stream_get_line()`, ...
64+
When you copy your code back to CodinGame, you must change every `$stdin` in `fscanf()`, `stream_get_line()`, ...
6565
by `STDIN` :
6666
```php
6767
// In this project :
6868
fscanf($stdin, "%d", $N);
6969
```
7070

7171
```php
72-
// On Codingame :
72+
// On CodinGame :
7373
fscanf(STDIN, "%d", $N);
7474
```
7575

7676

7777
## Timed out
7878

79-
Your code can work through this project and timed out on Codingame.
79+
Your code can work through this project and timed out on CodinGame.
8080
It means your solution is not optimum and you should find another algorithm.

tests/Training/Easy/ASCIIArt/ASCIIArtTest.dist.php renamed to tests/Training/Easy/ASCIIArt/CGTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @covers \CyrilVerloop\Codingame\Training\Easy\ASCIIArt\ASCIIArt
1414
* @group ASCIIArt
1515
*/
16-
final class ASCIIArtTest extends PuzzleTest
16+
final class CGTest extends PuzzleTest
1717
{
1818
public function setUp(): void
1919
{

tests/Training/Easy/Defibrillators/DefibrillatorsTest.dist.php renamed to tests/Training/Easy/Defibrillators/CGTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @covers \CyrilVerloop\Codingame\Training\Easy\Defibrillators\Defibrillators
1414
* @group defibrillators
1515
*/
16-
final class DefibrillatorsTest extends PuzzleTest
16+
final class CGTest extends PuzzleTest
1717
{
1818
public function setUp(): void
1919
{

tests/Training/Easy/HorseRacingDuals/HorseRacingDualsTest.dist.php renamed to tests/Training/Easy/HorseRacingDuals/CGTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @covers \CyrilVerloop\Codingame\Training\Easy\HorseRacingDuals\HorseRacingDuals
1414
* @group horseRacingDuals
1515
*/
16-
final class HorseRacingDualsTest extends PuzzleTest
16+
final class CGTest extends PuzzleTest
1717
{
1818
public function setUp(): void
1919
{

tests/Training/Easy/MIMEType/MIMETypeTest.dist.php renamed to tests/Training/Easy/MIMEType/CGTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @covers \CyrilVerloop\Codingame\Training\Easy\MIMEType\MIMEType
1414
* @group MIMEType
1515
*/
16-
final class MIMETypeTest extends PuzzleTest
16+
final class CGTest extends PuzzleTest
1717
{
1818
public function setUp(): void
1919
{

tests/Training/Easy/Temperatures/TemperaturesTest.dist.php renamed to tests/Training/Easy/Temperatures/CGTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @covers \CyrilVerloop\Codingame\Training\Easy\Temperatures\Temperatures
1414
* @group temperatures
1515
*/
16-
final class TemperaturesTest extends PuzzleTest
16+
final class CGTest extends PuzzleTest
1717
{
1818
public function setUp(): void
1919
{

tests/Training/Easy/Unary/UnaryTest.dist.php renamed to tests/Training/Easy/Unary/CGTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @covers \CyrilVerloop\Codingame\Training\Easy\Unary\Unary
1414
* @group unary
1515
*/
16-
final class UnaryTest extends PuzzleTest
16+
final class CGTest extends PuzzleTest
1717
{
1818
public function setUp(): void
1919
{

tests/Training/Expert/MusicScores/MusicScoresTest.dist.php renamed to tests/Training/Expert/MusicScores/CGTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @covers \CyrilVerloop\Codingame\Training\Expert\MusicScores\MusicScores
1414
* @group musicScores
1515
*/
16-
final class MusicScoresTest extends PuzzleTest
16+
final class CGTest extends PuzzleTest
1717
{
1818
public function setUp(): void
1919
{

0 commit comments

Comments
 (0)