oliverklee / dungeon-of-bugs
A console-based dungeon crawler game which I use in my TDD workshops.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 9
Type:project
Requires
- php: ^8.3
- symfony/console: ^7.2.1
Requires (Dev)
- ergebnis/composer-normalize: ^2.45.0
- friendsofphp/php-cs-fixer: ^3.65.0
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^2.0.3
- phpstan/phpstan-deprecation-rules: ^2.0.1
- phpstan/phpstan-phpunit: ^2.0.3
- phpstan/phpstan-strict-rules: ^2.0.1
- phpunit/phpunit: ^11.5.1
- symfony/yaml: ^7.2.0
- typo3/coding-standards: ^0.8.0
This package is auto-updated.
Last update: 2024-12-19 13:05:39 UTC
README
This project is a dungeon crawler game using PHP and the Symfony console.
It also is an exercise for my workshops on test-driven development (PHP).
Requirements
You'll need one of these:
- local PHP 8.3+ and Composer 2
- Docker and DDEV
Running the game
With local PHP:
bin/dungeon-of-bugs <path-to-level-file>
With DDEV:
ddev exec dungeon-of-bugs
Running the PHPUnit tests
On the command line
Running all tests
Running only the unit tests
Running only the functional tests
Running a single testcase
This example is for running the testcase
In PHPStorm
First, you need to configure the PHP interpreter in PHPStorm:
After this, configure PHPUnit:
- enter the PhpStorm settings
- PHP > Test Frameworks
- add a new PHPUnit configuration
- in "PHPUnit library",
select "Use Composer autoloader" and set
vendor/autoload.php
as path - in "Test Runner",
select "Default configuration file" and set
phpunit.xml
as path to script
Now you can right-click on a testcase or a directory and select "Run".
Credits
Part of the code has been copied from the Snake Console game by @dbu.