internations/testing-component

A collection of test helpers for Symfony 3 projects

Package info

github.com/InterNations/TestingComponent

pkg:composer/internations/testing-component

Statistics

Installs: 63 017

Dependents: 7

Suggesters: 0

Stars: 4

Open Issues: 0

1.4.0 2022-03-01 19:04 UTC

Requires

  • php: >=7.1.3

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT 8b888ca183a5d02d70acdcaa3f9cffcc334e458f

  • Lars Strojny <lars.strojny.woop@internations.org>
  • Michael Weinrich <michael.weinrich.woop@internations.org>
  • Marc Jakubowski <marc.jakubowski.woop@internations.org>
  • Max Beutel <max.beutel.woop@internations.org>
  • Hans Bernhard Streit <hans.streit.woop@internations.org>

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