InterNations / TestingComponent

A collection of test helpers for Symfony 2 projects

Home Page:http://www.internations.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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']);
    }
}

About

A collection of test helpers for Symfony 2 projects

http://www.internations.org


Languages

Language:PHP 99.6%Language:HTML 0.4%