Anzeige der Einträge mit Tag 'Mocking'

Late Static Binding Mocking Problem

In a recent attempt to upgrade Disco to the latest version of ProxyManager I ran into this FATAL ERROR: "Declaration of Mock_ClassGenerator_f7ebad25::setExtendedClass($extendedClass): ProxyManager\Generator\ClassGenerator must be compatible with ProxyManager\Generator\ClassGenerator::setExtendedClass($extendedClass): Zend\Code\Generator\ClassGenerator" when I tried to execute the unit tests. It took me a while to understand the source of the problem, thus I think sharing the problem might help my future me and probably you as well. Let's assume you have two classes The_Parent and The_Child:

mehr lesen...

Eintrag von Stephan Hochdörfer am 18.05.2017

Mocking callables in an Expressive app

While working with Zend Expressive, a PSR-7 middleware microframework, I wanted to apply some unit testing with a nice coverage to my middlewares. Middlewares are called by the __invoke method if you provide them as an object and not as a closure. The signature of the __invoke method looks like this:

mehr lesen...

Eintrag von Florian Horn am 26.04.2017

Messing with PHPUnit and Namespaces

Preparing the latest release of the Composer authstore plugin I ran into an issue with PHPUnit which at first glance was not easy to debug. However in the end it turned out to be my own fault ;)

mehr lesen...

Eintrag von Stephan Hochdörfer am 10.04.2014

Diese Webseite verwendet Cookies, um die Bedienfreundlichkeit zu erhöhen. Mit der Nutzung unserer Webseite wird das Einverständnis erklärt, dass wir Cookies verwenden. Weitere Informationen.