Files
yii2/docs/guide/test-unit.md
Alexander Makarov 7eb403bf45 Codeception test adjustments for basic and advanced applications
- Moved everything test-related into `tests` directory. Codeception tests are in `codeception`.
- Removed database module since we're using fixtures and migrations.
- Moved console entry points and bootstrap into `tests/codeception/bin`.
- Adjusted travis build scripts.
- Adjusted documentation to be consistent and reflect changes made.
2014-08-15 19:09:52 +04:00

989 B

Unit Tests

Note: This section is under development.

A unit test verifies that a single unit of code is working as expected. In object-oriented programming, the most basic code unit is a class. A unit test thus mainly needs to verify that each of the class interface methods works properly. That is, given different input parameters, the test verifies the method returns expected results. Unit tests are usually developed by people who write the classes being tested.

Unit testing in Yii is built on top of PHPUnit and, optionally, Codeception so it's recommended to go through their docs:

Running basic and advanced template unit tests

Please refer to instructions provided in apps/advanced/tests/README.md and apps/basic/tests/README.md.