internations/testing-component

A collection of test helpers for Symfony 3 projects

Installs: 62 523

Dependents: 7

Suggesters: 0

Security: 0

Stars: 4

Watchers: 31

Forks: 3

Open Issues: 0

pkg:composer/internations/testing-component

1.4.0 2022-03-01 19:04 UTC

README

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