I was trying to realize some Acceptance test to my application. In order to do this some configurations should be done.
I was trying to set a foreign key to a field but I found myself getting this error.
SQLSTATE[HY000]: General error: 1005 Can't create table 'database.#sql-448_10c' (errno: 150) (SQL: alter table `table` add constraint articletypes_articletype_id_foreign foreign key (`articletype_id`) references `articletypes` (`id`))
I was trying to test the security through filters in a functional test in Laravel4 but the filters wasn’t working so I look up and it’s not necessarily a problem. By default codecept disables the filters while testing. If you, like me, need those filters working on some tests just add the next instruction at the beginning of the cept.
That instruction does what it says on the tin, enables the filters for the test.
Installing Codecept through Composer it’s fairly easy just make sure to update your composer.json file and add the following code in the require-dev object