Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 728 Bytes

README.md

File metadata and controls

36 lines (25 loc) · 728 Bytes

Test helpers for Symfony projects

Build Status

A collection of test helpers to ease testing of Symfony3 projects.

The base test class

<?php
use InterNations\Component\Testing\AbstractTestCase;

class MyTest extends AbstractTestCase
{
}

Accessing restricted members

<?php
use InterNations\Component\Testing\AccessTrait;


class MyTest ...
{
    use AccessTrait;

    public function testSomething()
    {
        $this->setNonPublicProperty($this->sut, 'privateProperty', 'value');
        $this->callNonPublicMethod($this->sut, 'protectedMethod', ['arg1', 'arg2']);
    }
}