Свежайшие Пирожки от CakePHP по-русски

Полнейшее руководство CakePHP 1.2 на русском языке, горячие новости и полезные статьи

Testing components

Lets assume that we want to test a component called TransporterComponent, which uses a model called Transporter to provide functionality for other controllers. We will use four files:

  • A component called Transporters found in app/controllers/components/transporter.php
  • A model called Transporter found in app/models/transporter.php
  • A fixture called TransporterTestFixture found in app/tests/fixtures/transporter_fixture.php
  • The testing code found in app/tests/cases/transporter.test.php