Skip to content

jpchateau/php-kata

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-kata

PHP skeleton for doing coding katas

Code Kata is a term coined by Dave Thomas, co-author of the book The Pragmatic Programmer, in a bow to the Japanese concept of kata in the martial arts. A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition.

You can find some to start practicing here.

When you do programming katas, you use TDD. That's why PHPUnit is included.

Practicing a kata

You will need PHP >= 8.1 and composer.

$ composer install

You can also use a container (Docker is required):

$ docker build -t kata-php .
$ docker run -it --rm -v ${PWD}:/data --name kata-php kata-php bash

Then, write your classes in src/ and your test cases in tests/ and run your tests.

$ bin/phpunit

TestCase examples

You will find one class and its TestCase in the project in order to help you. You can delete them.
Adder is a class that adds two numbers and AdderTest tests that.

About

PHP skeleton for doing coding katas (PHPUnit, prophecy)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 93.6%
  • Dockerfile 6.4%