jeudi 25 août 2016

What is the difference between Codepeception\Util\Stub::construct('SomeClass') and new SomeClass?

There are two ways to create new class writing unit tests in Codeception.

use Codeception\Util\Stub as Stub;
$SomeClass = new SomeClass();
$SomeClass = Stub::construct('SomeClass');

Can someone explain what is the difference between this two approaches?

Aucun commentaire:

Enregistrer un commentaire