International PHP Conference
The Conference for PHP and Web Development

CakePHP Test Fixture Factories

Session
Until February 25:
✓ Workshop-Day for free
✓ Group discount
✓ Save up to € 700
Register now
Bis 25. Februar:
✓ Workshop-Tag gratis
✓ Kollegenrabatt
✓ Bis zu 700 € sparen
Jetzt anmelden
Thank you for attending
✓ See you in 2021!
Danke für Eure Teilnahme
✓ Bis 2021!
Infos
Wednesday, December 9 2020
12:00 - 12:45

CakePHP is known for featuring a powerful and intuitive convention-based Object Relational Mapper. But like many PHP frameworks, it shows limitations in the management of test fixtures.

One approach consists in loading or emulating a database dump before each test is run. Another one creates the test fixtures with the help of factories inside each test.

The first approach breaks the rule of test independence, and leads to opaque tests. We investigated the second approach, which delivers more intelligible tests. But as a trade off, tests got slower to write.

Really slower? No. Thanks to the CakePHP ORM, we came up with an efficient method to write test fixtures on the fly: the CakePHP Fixture Factories. Tests are fast to write and document ideally your application. The package drastically increases the tests’ speed by offering the possibility to create entities without persistence.

On the journey we developed a trigger-based PHPUnit test listener in order to refresh test databases prior to each test.

Whether you are a CakePHP developer or not, the presentation will provide insights on how to arrange your tests and manage your test fixtures.

Juan Pablo Ramirez – Nicolas Masson
https://github.com/vierge-noire/cakephp-fixture-factories
https://github.com/vierge-noire/cakephp-test-suite-light

Take me to the full program of Zum vollständigen Programm von Berlin Berlin .

This Session belongs to the Diese Session gehört zum Programm vom BerlinBerlin program. Take me to the program of . Hier geht es zum Programm von Munich München .

This Session Diese Session belongs to the gehört zum Programm von BerlinBerlin program. Take me to the current program of . Hier geht es zum aktuellen Programm von Berlin Berlin or oder Munich München .

Stay tuned!

Behind the Tracks of IPC

PHP Core Technology
Best Practices & Application

General Web Development
General Web Development & more

Agile & Company Culture
Agility has become mainstream

Software Architecture
Concepts & Environments

Security
All about Web Security

Testing & Test Driven Development
More about software testing tools and strategies

DevOps & Continuous Delivery
DevOps is a philosophy

Docker, Kubernetes, Cloud
Cloud-based & native apps

#slideless (pure coding)
Showing how technology really works

PHP Frameworks
All about PHP Frameworks

Content Management Systems
Sessions on Content Management Systems