PHPackages                             oliverklee/tea - 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. oliverklee/tea

Abandoned → [ttn/tea](/?search=ttn%2Ftea)ArchivedTypo3-cms-extension[Testing &amp; Quality](/categories/testing)

oliverklee/tea
==============

TYPO3 example extension for unit testing and best practices

v2.0.0(8y ago)23323[1 issues](https://github.com/oliverklee/ext-tea/issues)[1 PRs](https://github.com/oliverklee/ext-tea/pulls)GPL-3.0-or-laterPHPPHP ~7.0.0 || ~7.1.0 || ~7.2.0

Since May 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/oliverklee/ext-tea)[ Packagist](https://packagist.org/packages/oliverklee/tea)[ Docs](https://github.com/oliverklee/tdd-reader)[ RSS](/packages/oliverklee-tea/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (9)Versions (2)Used By (0)

Tea example
===========

[](#tea-example)

This repository has moved to the [TYPO3 Trainer Network](https://github.com/typo3-trainer-network/tea).
-------------------------------------------------------------------------------------------------------

[](#this-repository-has-moved-to-the-typo3-trainer-network)

[![Build Status](https://camo.githubusercontent.com/45d407e395b66f28c62cdec1e6e1ee0fbacdf0c8916fa32771be5c2247fb4c77/68747470733a2f2f7472617669732d63692e6f72672f6f6c697665726b6c65652f6578742d7465612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/oliverklee/ext-tea)[![Latest Stable Version](https://camo.githubusercontent.com/6f5090510ab0cfc566b604c02cb788c3d9bca8b248714d3fe1c383241bede1c3/68747470733a2f2f706f7365722e707567782e6f72672f6f6c697665726b6c65652f7465612f762f737461626c652e737667)](https://packagist.org/packages/oliverklee/tea)[![Total Downloads](https://camo.githubusercontent.com/12e70dfdd6338eb593399fcd6a37bb7369a6512966ead00aea15c4f4f887501b/68747470733a2f2f706f7365722e707567782e6f72672f6f6c697665726b6c65652f7465612f646f776e6c6f6164732e737667)](https://packagist.org/packages/oliverklee/tea)[![Latest Unstable Version](https://camo.githubusercontent.com/a5693bb90e6bae5711c54ce1e0a181681e94560894ed51a4a62d301bea42c8b7/68747470733a2f2f706f7365722e707567782e6f72672f6f6c697665726b6c65652f7465612f762f756e737461626c652e737667)](https://packagist.org/packages/oliverklee/tea)[![License](https://camo.githubusercontent.com/c1e8cdc9642c6a46201bba5ad0353ae4a0df294718296202562f1fd3c616527a/68747470733a2f2f706f7365722e707567782e6f72672f6f6c697665726b6c65652f7465612f6c6963656e73652e737667)](https://packagist.org/packages/oliverklee/tea)

This TYPO3 extension is an example for writing unit and functional tests for Extbase/Fluid-based extensions for TYPO3 CMS using PHPUnit.

It also is an example for [best practices for extbase/fluid](https://github.com/oliverklee/workshop-handouts/tree/master/extbase-best-practices).

For information on the different ways to execute the tests, please have a look at the [handout to my workshops on test-driven development (TDD)](https://github.com/oliverklee/tdd-reader).

Running the unit tests from the command line
--------------------------------------------

[](#running-the-unit-tests-from-the-command-line)

```
.Build/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml Tests/Unit/
```

Running the tests in PhpStorm
-----------------------------

[](#running-the-tests-in-phpstorm)

### General PHPUnit setup

[](#general-phpunit-setup)

```
composer require typo3/cms ^9.5
composer install
git checkout HEAD -- composer.json
```

File &gt; Settings &gt; Languages &amp; Frameworks &gt; PHP &gt; Test Frameworks

- (\*) Use Composer autoloader
- Path to script: select `.Build/vendor/autoload.php` in your project folder

In the Run configurations, edit the PHPUnit configuration and use these settings so this configuration can serve as a template:

- Directory: use the `Tests/Unit` directory in your project
- Use alternative configuration file
- use `.Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml`in your project folder
- Add the following environment variables:
    - typo3DatabaseUsername
    - typo3DatabasePassword
    - typo3DatabaseHost
    - typo3DatabaseName

### Unit tests configuration

[](#unit-tests-configuration)

In the Run configurations, copy the PHPUnit configuration and use these settings:

- Directory: use the `Tests/Unit` directory in your project

### Functional tests configuration

[](#functional-tests-configuration)

In the Run configurations, copy the PHPUnit configuration and use these settings:

- Directory: use the `Tests/Functional` directory in your project
- Use alternative configuration file
- use `.Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml`

### Running the acceptance tests

[](#running-the-acceptance-tests)

#### On the command line

[](#on-the-command-line)

1. make sure you have Chrome installed on your machine
2. `composer update codeception/codeception` (just in case)
3. [download the latest version of ChromeDriver](http://chromedriver.chromium.org/downloads)
4. unzip it
5. `chromedriver --url-base=wd/hub`
6. `.Build/vendor/bin/codecept run` (in another terminal)

#### In PhpStorm

[](#in-phpstorm)

1. make sure the "Codeception Framework" plugin is activated
2. right-click on `Tests/Acceptance/StarterCest.php`
3. Run 'Acceptance (Codeception)'

Creating new extensions with automated tests
--------------------------------------------

[](#creating-new-extensions-with-automated-tests)

For creating new extensions, I recommend taking [Helmut Hummel's extension skeleton](https://github.com/helhum/ext_scaffold)as a starting point.

About me (Oliver Klee)
----------------------

[](#about-me-oliver-klee)

I am the maintainer of the [PHPUnit TYPO3 extension](http://typo3.org/extensions/repository/view/phpunit), which is available in the TYPO3 extension repository (TER).

You can book me for [workshops](https://www.oliverklee.de/workshops/workshops.html)at your company.

I also frequently give workshops at the TYPO3 Developer Days.

More Documentation
------------------

[](#more-documentation)

- [Handout to my workshops on test-driven development (TDD)](https://github.com/oliverklee/tdd-reader)
- [Handout for best practices with extbase and fluid](https://github.com/oliverklee/workshop-handouts/blob/master/extbase-best-practices/extbase-best-practices.pdf)

Other example projects
----------------------

[](#other-example-projects)

- [Selenium demo](https://github.com/oliverklee/selenium-demo)for using Selenium with PHPUnit
- [Anagram finder](https://github.com/oliverklee/anagram-finder)is the finished result of a code kata for TDD
- [Coffee example](https://github.com/oliverklee/coffee)is my starting point for demonstrating TDD with TYPO3 CMS
- [TDD Seed](https://github.com/oliverklee/tdd-seed)for starting PHPUnit projects with Composer (without TYPO3 CMS)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.3% 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.

###  Release Activity

Cadence

Every ~414 days

Total

2

Last Release

2929d ago

Major Versions

1.0.0 → v2.0.02018-06-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cc98eb6580d4532340e818ea893009da65365b7f3525f518d143732e838735a?d=identicon)[oliverklee](/maintainers/oliverklee)

---

Top Contributors

[![oliverklee](https://avatars.githubusercontent.com/u/765746?v=4)](https://github.com/oliverklee "oliverklee (146 commits)")[![dev-stefan](https://avatars.githubusercontent.com/u/3592983?v=4)](https://github.com/dev-stefan "dev-stefan (1 commits)")

---

Tags

phpunitunit testingTDDextensionexampletypo3Best-Practices

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/oliverklee-tea/health.svg)

```
[![Health](https://phpackages.com/badges/oliverklee-tea/health.svg)](https://phpackages.com/packages/oliverklee-tea)
```

###  Alternatives

[ttn/tea

TYPO3 example extension for unit testing and best practices

9323.6k](/packages/ttn-tea)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[georgringer/news

News system - Versatile news system based on Extbase &amp; Fluid and using the latest technologies provided by TYPO3 CMS.

2825.2M115](/packages/georgringer-news)[pagemachine/typo3-formlog

Form log for TYPO3

23233.9k8](/packages/pagemachine-typo3-formlog)[typo3/testing-framework

The TYPO3 testing framework provides base classes for unit and functional testing.

675.3M1.1k](/packages/typo3-testing-framework)[friendsoftypo3/visual-editor

TYPO3 CMS Visual Editor - Brings a modern WYSIWYG editing experience to TYPO3 CMS.

576.1k2](/packages/friendsoftypo3-visual-editor)

PHPackages © 2026

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