[FLOW3-general] Unit Testing
Karsten Dambekalns
karsten at typo3.org
Tue Nov 6 10:52:38 CET 2012
Hi.
On 18.10.12 15:06, Christian Peters wrote:
> Okay, I got that with the BaseTestCase. What I do not understand is, that
> you are creating the Class under Test via mocking as well, or did get that
> wrong?
>
> Normally I wouldn't create the class under test as mock ...
It depends. If your CUT (class under test) has some methods that
"connect" it to the outside or have side effects, you might want / need
to mock those. As long as the code you actually test is not mocked… :)
> My phpunit call is (from flow root dir):
> phpunit -c Build/buildessentials/PhpUnit/UnitTests.xml
Looks good.
> And I get:
>> PHP Fatal error: Cannot redeclare class Composer\Autoload\ClassLoader in
> /Users/chp/Web/private/flow/Packages/Vendor/composer/ClassLoader.php on
> line 44
Hm. No idea, sorry. Can you step through with a debugger to find out
where it is included the first and second time?
Regards,
Karsten
--
Karsten Dambekalns
TYPO3 Core Developer, Neos / Flow Team
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list