PHPackages                             roukmoute/dto-tester - 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. roukmoute/dto-tester

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

roukmoute/dto-tester
====================

Add PHPUnit extension for testing DTOs and Transfer Objects

v0.5(5y ago)8171MITPHPPHP ^7.2CI failing

Since Oct 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/roukmoute/dto-tester)[ Packagist](https://packagist.org/packages/roukmoute/dto-tester)[ RSS](/packages/roukmoute-dto-tester/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (5)Versions (6)Used By (1)

DTO Tester
==========

[](#dto-tester)

[![CI](https://github.com/roukmoute/dto-tester/actions/workflows/CI.yml/badge.svg)](https://github.com/roukmoute/dto-tester/actions/workflows/CI.yml)

Automatically PHPUnit Test DTO and Transfer Objects.

Original idea: [Automatically JUnit Test DTO and Transfer Objects](https://objectpartners.com/2016/02/16/automatically-junit-test-dto-and-transfer-objects/)

Installation
------------

[](#installation)

These commands requires you to have [Composer](https://getcomposer.org/download/) installed globally.
Open a command console, enter your project directory and execute the following commands to download the latest stable version:

```
composer require --dev roukmoute/dto-tester
```

Usage
-----

[](#usage)

All we need to do is extend `DtoTester\DtoTest` and create a test instance and the `DtoTest` class will do the rest.

Here it is an example class named `FooBar`:

```
