Wednesday, January 21, 2015

Iter of cakephp tests

Hi all
I'm writing hereu to understand well cakephp tests.


So my question is:
How to make good tests?
Because in cakephp documentation isn't exaplained well I think or I haven't understand well the correct iter.

What I have always done:
- Created default database
- Created test database
- Populated the default database
- Exported all database and imported into the tests database with all records
- Started to create test
- Created fixtures with declarations of fields and records
- Created tests model that load fixtures.

I thinked that when I'm starting to test when the framework load fixtures delete the table of the fixtures and redraw it with field and records.
Is wrong right?
Database table are dropped after tests I have read

Ok, so what is the good way to insert my records into database tests?
Repopulate the database tests from phpmyadmin for example? 

But in this way what is the purpose of the $records array in fixtures?

I would like to know the best practice to create a great workflow for tests

Thanks

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: