PHPackages                             eduardofg87/lets-tdd-a-simple-app - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. eduardofg87/lets-tdd-a-simple-app

ActiveLibrary[Testing &amp; Quality](/categories/testing)

eduardofg87/lets-tdd-a-simple-app
=================================

A simple PHP project to learn TDD

802PHP

Since Jun 7Pushed 6y agoCompare

[ Source](https://github.com/eduardofg87/lets-tdd-a-simple-app)[ Packagist](https://packagist.org/packages/eduardofg87/lets-tdd-a-simple-app)[ RSS](/packages/eduardofg87-lets-tdd-a-simple-app/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Let's TDD a Simple App in PHP
=============================

[](#lets-tdd-a-simple-app-in-php)

A simple PHP project to learn TDD

[My post in Medium about the code](https://medium.com/php-brasil/tdd-iniciando-com-tdd-no-php-934a0cc90e5b)

Introduction
------------

[](#introduction)

Your task is to build Class called Wrapper and its method called wrap.

Task definition:
----------------

[](#task-definition)

You have to implement all tasks to pass all tests.

tasks:
------

[](#tasks)

- implement testItShouldWrapAnEmptyString
- implement testDoesNotWrapAShorterThanMaxCharsWord
- implement testItWrapsAWordSeveralTimesIfItsTooLong
- implement testItWrapsTwoWordsWhenSpaceAtTheEndOfLine
- implement testItWrapsTwoWordsWhenLineEndIsAfterFirstWord
- implement testItWraps3WordsOn2Lines
- implement testItWraps2WordsOn3Lines
- implement testItWraps2WordsAtBoundry
- create new class named Wrapper

Installation
============

[](#installation)

`git clone https://github.com/eduardofg87/lets-tdd-a-simple-app`

`cd lets-tdd-a-simple-app`

`composer install`

### EXTRA:

[](#extra)

keep track of the history of encoded words in a local storage.

### Hints

[](#hints)

Think about how to prevent invalid inputs from being passed to the algorithms.

### test

[](#test)

to run the tests run the command: `./vendor/bin/phpunit ./tests/FirstTest`

### Misc

[](#misc)

- [PHP Unit](https://phpunit.de/)
- [Let's TDD a simple App in PHP](https://code.tutsplus.com/tutorials/lets-tdd-a-simple-app-in-php--net-26186)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/96b97ccdf9f1b8ecf17e3a77d8d0726b38eb6227168a8176cc3bb3d4d145458e?d=identicon)[eduardofg87](/maintainers/eduardofg87)

---

Top Contributors

[![eduardofg87](https://avatars.githubusercontent.com/u/38121716?v=4)](https://github.com/eduardofg87 "eduardofg87 (9 commits)")

### Embed Badge

![Health badge](/badges/eduardofg87-lets-tdd-a-simple-app/health.svg)

```
[![Health](https://phpackages.com/badges/eduardofg87-lets-tdd-a-simple-app/health.svg)](https://phpackages.com/packages/eduardofg87-lets-tdd-a-simple-app)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
