Skip to content

ItsAbderrahimEl/CodeKatas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 Code Katas in PHP using PHPUnit

This repository is a collection of classic and creative code katas implemented in PHP using PHPUnit — the testing framework that also powers Pest. These katas serve as exercises to improve your problem-solving, TDD workflow, and deepen your understanding of PHP testing principles.


Github Code


🎯 Purpose

  • Practice Test-Driven Development (TDD)
  • Build strong habits in clean coding and refactoring
  • Explore how PHPUnit supports reliable, testable code
  • Lay the groundwork for adopting Pest, built on top of PHPUnit

🧩 Included Katas

Kata Description
GildedRose Refactor a legacy inventory system with evolving requirements
QUIZ Logic-based kata to reinforce conditionals and flow control
SubscribeFunction Functional implementation of a dynamic subscribe mechanism
TennisMatch Simulates the scoring system of a tennis game
FizzBuzz Classic introductory kata for TDD and control logic
PrimeFactors Decompose numbers into their prime factors
RomanNumerical Convert integers to Roman numerals
Song: No More Beers Prints verses of a countdown-style song ("No more beers on the table")
StringCalculator Parse and sum up numbers in a string input
TagParser Extract and structure custom tags from text

🛠️ Tech Stack

  • PHP 8.1+
  • PHPUnit – Core testing framework used throughout
  • (Pest not used directly, but this repo demonstrates the foundation Pest is built on)

🚀 Getting Started

  1. Clone the repository
git clone https://github.com/blackjack465/CodeKatas.git
cd CodeKatas

About

Some code katas with PHP and there tests with phpUnit. Good Day.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages