PHPackages                             cekurte/tdd - 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. cekurte/tdd

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

cekurte/tdd
===========

PHPUnit TestCase

v1.0.2(10y ago)25667MITPHPPHP &gt;=5.3

Since Aug 17Pushed 10y agoCompare

[ Source](https://github.com/jpcercal/tdd)[ Packagist](https://packagist.org/packages/cekurte/tdd)[ RSS](/packages/cekurte-tdd/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (7)

Cekurte\\TDD
============

[](#cekurtetdd)

[![Build Status](https://camo.githubusercontent.com/89b658a490274fd9c0f66efaa9cd5ae84c4b03e5aabcdf42fc07d443c0d3c041/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a7063657263616c2f7464642f6d61737465722e7376673f7374796c653d737175617265)](http://travis-ci.org/jpcercal/tdd)[![Code Climate](https://camo.githubusercontent.com/3af08fff944adcd2dc48990799795fec37e450ceed643ba3990612ef4c2d5f14/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6a7063657263616c2f7464642f6261646765732f6770612e737667)](https://codeclimate.com/github/jpcercal/tdd)[![Coverage Status](https://camo.githubusercontent.com/a63c4204a75d3df9b049b1feb72a4fda84b2fe4e81c094df116036e79e7af9c2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6a7063657263616c2f7464642f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/jpcercal/tdd?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/01d9a648483f94c488e4a505d57c2e29fec250028957339329472091bebc3f25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63656b757274652f7464642e7376673f7374796c653d737175617265)](https://packagist.org/packages/cekurte/tdd)[![License](https://camo.githubusercontent.com/bcc28339a45bdfec76e542ba04c1f9c4a7db639e342a33077c4b91af41dc3979/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f63656b757274652f7464642e7376673f7374796c653d737175617265)](https://packagist.org/packages/cekurte/tdd)[![SensioLabsInsight](https://camo.githubusercontent.com/231686a957c5e1640c23febbfb86cacc4cc9690b80ccfb91d1d7f877d273c003/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f32366462326162332d653435322d343236372d393734322d3265306361633034663736352f6d696e692e706e67)](https://insight.sensiolabs.com/projects/26db2ab3-e452-4267-9742-2e0cac04f765)

- Just a simple extension to the PHPUnit library.
- Currently this package contains only support for one TestCase scenario [ReflectionTestCase](https://github.com/jpcercal/tdd/blob/master/src/ReflectionTestCase.php) **contribute with this project**!

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

[](#installation)

- The package is available on [Packagist](http://packagist.org/packages/cekurte/tdd).
- The source files is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) compatible.
- Autoloading is [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md) compatible.

```
composer require cekurte/tdd
```

**If you liked of this library, give me a *star =)*.**

Documentation
-------------

[](#documentation)

This library was created to permit that developers write php unit tests using a common base class, including initially the following tasks:

- Set a private, protected or public property value;
- Get a private, protected or public property value;
- Call a private, protected or public method.

### Setting a property value

[](#setting-a-property-value)

To set a property value (independently of your visibility) you can use the method [ReflectionTestCase::propertySetValue](https://github.com/jpcercal/tdd/blob/master/src/ReflectionTestCase.php#L34) like the following example:

```
