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 7y 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 3w ago

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 9% 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://avatars.githubusercontent.com/u/38121716?v=4)[Eduardo Figueiredo Gonçalves](/maintainers/eduardofg87)[@eduardofg87](https://github.com/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

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M357](/packages/dms-phpunit-arraysubset-asserts)[phpbenchmark/phpbenchmark

Easy to use benchmark toolkit for your PHP-application. This library contains classes for comparing algorithms as well as benchmarking application responses

8011.5k2](/packages/phpbenchmark-phpbenchmark)

PHPackages © 2026

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