Why is there a PostFixture in the cakephp core?

20 Views Asked by At

I wanted to add a blog to my cakephp 2.6.13 installation and named the table Post. After I was done with everything I ran the tests and discovered, that they fail.

PHP Fatal error: Cannot redeclare class PostFixture in /var/www/gutscheinpony/vendor/cakephp/cakephp/lib/Cake/Test/Fixture/PostFixture.php on line 51

Can I run my tests with the name Post or do I have to pick another name?

If not, why is there a PostFixture in the core anyway?
https://github.com/cakephp/cakephp/blob/2.6.13/lib/Cake/Test/Fixture/PostFixture.php

1

There are 1 best solutions below

0
Chriss Baumfleisch On

So I figured out why this happend.
You can load your own fixtures using app.post in your test cases and core.post to load the core fixtures.
For some reason one of the plugins I use called the core fixture and caused the issue.