update tests Auth Cache Core Module Locale

Revert modifications Model_Write
Le 23/07/2014 02:12, Richard Griffith a écrit :
>
> In 
> UnitTestXoops/xoopsLib/Xoops/Core/Kernel/XoopsPersistableObjectHandlerTest.php:
>
> > @@ -1,6 +1,17 @@
> >  <?php
> >  require_once(dirname(__FILE__).'/../../../../init.php');
> >
> > +use Doctrine\DBAL\Query\QueryBuilder;
> > +
> > +class XoopsPersistableObjectHandlerTest_Kernel_CriteriaElement extends Xoops\Core\Kernel\CriteriaElement
>
> Could this be replaced with a phpunit style mock which would return 
> the proper data? See: getMockForAbstractClass() 
> <http://phpunit.de/manual/4.1/en/test-doubles.html#test-doubles.mocking-traits-and-abstract-classes>
>
> As it is, this class should fail any test as a CriteriaElement since 
> it does not obey the described spec.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/XOOPS/XoopsCore/pull/166/files#r15265140>.
>


I made some tests with getMockForAbstractClass() 
<http://phpunit.de/manual/4.1/en/test-doubles.html#test-doubles.mocking-traits-and-abstract-classes> 
but There is a problem for classes with protected or private constructor 
that fails with this generic call (error calling a protectec __construct).

I will use it whenever is possible but I keep simple solution for 
special cases.
I will modify how to use abastract class to insure the good spec