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.1.7
Requires (Dev)
- ergebnis/composer-normalize: ^2.44.0
- friendsofphp/php-cs-fixer: ^3.64.0
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^1.12.8
- phpstan/phpstan-deprecation-rules: ^1.2.1
- phpstan/phpstan-phpunit: ^1.4.0
- phpstan/phpstan-strict-rules: ^1.6.1
- phpunit/phpunit: ^11.4.3
- symfony/yaml: ^7.1.6
- typo3/coding-standards: ^0.8.0
This package is auto-updated.
Last update: 2024-11-06 22:52:03 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.