-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 772e7a7
Showing
10 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
_commit: 0.6.1 | ||
_src_path: gh:selrahcd/copier-php-kata | ||
include_docker: true | ||
include_sample_test: true | ||
include_tcr_script: true | ||
kata_name: MarsRover | ||
tell_about_test_run_logger: true | ||
test_run_logger: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
vendor | ||
.phpunit.result.cache | ||
test-run-logs.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM php:8.1-cli-alpine | ||
|
||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
|
||
WORKDIR /app | ||
|
||
CMD [ "php", "-a" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# MarsRover | ||
|
||
## Instructions | ||
|
||
[See instructions here](https://katalyst.codurance.com/simple-mars-rover) | ||
|
||
## Getting started | ||
|
||
Run `composer install` to get dependencies. | ||
|
||
Alternatively, you can install dependencies using docker with `docker-compose run --rm php composer install`. | ||
|
||
## Run tests | ||
|
||
You can run tests with PhpUnit using `./vendor/bin/phpunit`. | ||
|
||
If you prefer using docker you can run tests with `docker-compose run --rm php ./vendor/bin/phpunit`. | ||
|
||
A Test Run Logger is installed and logs all test runs. At the end of the kata you | ||
can take a moment to review the logs and see if you see strange patterns. To make it easier | ||
to review you can write the time when you're entering or leaving a refactoring phase, or when | ||
you're facing difficulties. If you see something weird, what could have you done differently to avoid it? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"require-dev": { | ||
"selrahcd/phpunit-test-run-logger": "0.1", | ||
"phpunit/phpunit": "^9.5" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"MarsRover\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"MarsRover\\": "tests/" | ||
} | ||
}, | ||
"require": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: "3.9" | ||
|
||
services: | ||
php: | ||
build: . | ||
volumes: | ||
- .:/app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.4/phpunit.xsd" | ||
> | ||
|
||
<testsuites> | ||
<testsuite name="All"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
|
||
<extensions> | ||
<extension class="Selrahcd\PhpunitTestRunLogger\TestRunLogger"> | ||
</extension> | ||
</extensions> | ||
|
||
|
||
</phpunit> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
./vendor/bin/phpunit && git commit -am 'Working' || git checkout -- ./src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MarsRover; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
class SampleTest extends TestCase | ||
{ | ||
|
||
public function testSample() { | ||
$this->assertTrue(true); | ||
} | ||
} |