ColdFusion

Simple ColdBox Model Unit Tester

I just started using ColdBox and wanted to use the unit testing features but it wasn't working with MXUnit so I developed the following set of conventions and components to help me test my models.

For each model that you want to test create a component with the name test in front of it. For example the a user model you would create testuser. In that component create methods that will be responsible for testing each of the model methods. You could choose otherwise but I find this the most intuitive.

Flexible ColdFusion & PHP SQL Table Filter

Here is a slick little function that I wrote the other day at work to create a filter on a table.

Pseudo code:

Requirements: The argument names must match the table column names.

Results: Returns a query of the filter table data.

Determine which arguments were passed into the function and add those into the query where statement.

Syndicate content