Woohoo!

Standard
This post is over 12 years old and is probably out of date.

I have been writing Unit Tests for Cerebral Cortex for quite a while now.

I have been using the .phpt method for testing. Its uber easy to write tests and to debug them.

I have found a bunch of bugs with them, and I just wanted to share with you the latest results:

  1. C:webcerebralcortexpackages>pear run-tests -r -s
  2. Running 37 tests
  3. PASS [Crtx_XML_WSDL] Correctly generate PHP Skeleton code from WSDL
  4. PASS [Crtx_XML_WSDL] Correctly Parse a complex WSDL file
  5. PASS [Crtx_XML_WSDL] Correctly create WSDL for PHPs str_replace function
  6. PASS [Crtx_Template] Parse a simple template correctly
  7. PASS [Crtx_Template] Set Custom Module Directory
  8. PASS [Crtx_Template] Include a template correctly.
  9. PASS [Crtx_Template] Text_Wiki Module parses/renders correctly
  10. PASS [Crtx_Template] Text_XML_RSS Module parsers/renders correctly
  11. PASS [Crtx_Template] Variables Module get/sets correctly ()
  12. PASS [Crtx_Template] Variables Module get/sets correctly ()
  13. PASS [Crtx_Template] Include nested templates correctly.
  14. PASS [Crtx_Exception] Make sure messages/error codes are set properly
  15. PASS [Crtx_DB_DataObject] Add new Record
  16. PASS [Crtx_DB_DataObject] Add records with a relationship
  17. PASS [Crtx_DB_DataObject] Count all Records in table
  18. PASS [Crtx_DB_DataObject] Count Records based on Conditions
  19. PASS [Crtx_DB_DataObject] Update Single Record withour prior find() call
  20. PASS [Crtx_DB_DataObject] Return false on Find with multiple non-existant IDs
  21. PASS [Crtx_DB_DataObject] Return false on Find with non-existant ID
  22. PASS [Crtx_DB_DataObject] Find First Record in table
  23. PASS [Crtx_DB_DataObject] Find multiple records based on IDs
  24. PASS [Crtx_DB_DataObject] Find record(s) based on object vars (not ID)
  25. PASS [Crtx_DB_DataObject] Find single record based on ID
  26. PASS [Crtx_DB_DataObject] Limit Queries without using Database
  27. PASS [Crtx_DB_DataObject] Make sure DB and Non-DB Limits give same results
  28. PASS [Crtx_DB_DataObject] Limit Queries using Database
  29. PASS [Crtx_DB_DataObject] Check that newRecord() returns a Crtx_DB_DataObject_Record object
  30. PASS [Crtx_DB_DataObject] Rollback Record
  31. PASS [Crtx_DB_DataObject] Update Single Record withour prior find() call
  32. PASS [Crtx_Config] Correctly get and set values (same config instance)
  33. PASS [Crtx_Config] Correctly get and set values (different config instances)
  34. PASS [Crtx_Config] Read and write an array
  35. PASS [Crtx_Config] Read and write Decimal Numbers
  36. PASS [Crtx_Config] Read and write Hex/Octal Numbers
  37. PASS [Crtx_Config] Read and write an object
  38. PASS [Crtx_Config] Overwrite values
  39. PASS [Crtx_Config] Read and Write strings
  40. TOTAL TIME: 00:46
  41. 37 PASSED TESTS
  42. 0 SKIPPED TESTS

So, as I said earlier: WooHoo!

– Davey