2017 © Pedro Peláez
 

library php-unit-test

An extension of the PHPUnit Testing Framework. Created to cleanup unit test writing.

image

corycollier/php-unit-test

An extension of the PHPUnit Testing Framework. Created to cleanup unit test writing.

  • Sunday, January 10, 2016
  • by corycollier
  • Repository
  • 1 Watchers
  • 0 Stars
  • 33 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 6 % Grown

The README.md

php-unit-test

An extension of the PHPUnit Testing Framework. Created to cleanup unit test writing., (*1)

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status, (*2)

Why

The purpose is merely to add some functions to cleanup usage of PHPUnit. Currently, the following methods exist:, (*3)

  • getReflectionMethod($subject, $method)
  • getReflectionProperty($subject, $property)
  • getReflectionPropertyValue($subject, $property)
  • setReflectionPropertyValue($subject, $property, $value)
  • assertReflectionPropertyValue($expected, $subject, $property)

Usage

``` use \PhpUnitTest\TestCase as TestCase; class ExampleTest extends TestCase { public function testSomething() { $expected = 'some expected value'; $sut = new NuttyClass; $sut->doSomethign(); $this->assertReflectionPropertyValue($expected, $sut, 'internalProperty'); } }, (*4)

The Versions