Daylight News

FUEL CMS adds testing and user guide modules

It’s been a while since our initial announcement regarding our CodeIgniter content management system, FUEL CMS. However, we’ve been making some steady progress fixing bugs, adding some features and creating the ever important documentation. Some of the biggest strides we’ve made have been in the form of a new User Guide and a Tester module.

User Guide

One of CodeIgniter’s greatest strengths is its documentation. Commenting code is one thing, but creating nicely organized, styled documentation with plenty of examples for users to quickly digest takes a lot more work. We’ve taken a cue from Ellis Labs and their great documentation style guide they used for CodeIgniter to create an extensible user guide module to make documentation almost fun to write.

When FUEL CMS becomes available, adding a views/_docs folder to your module to hold all your documentation is all you need to do for it to get included into the FUEL CMS User Guide. The FUEL CMS User Guide module styles will automatically be included for your documentation to use. You can also create a application/views/_docs folder to display a link to site specific documentation for your clients which will appear in your FUEL Dashboard.

Tester

Since our work on FUEL has been transitioning more into the documentation and testing of the code, we decided that an elegant FUEL module to run tests was essential. Our requirements were:

  • We needed a simple UI interface to control which tests to run
  • We needed to do both unit testing to test our functions and classes as well as integration testing to test our controller and view output
  • We wanted it use the existing Unit_test class

CodeIgniter’s Unit_test Class seemed simple enough and got us part of the way there but the testing of the controllers and view files was going to be a bit more of a challenge. We started thinking about simple solutions to do this that didn’t require installing something like Selenium and realized that jQuery would be perfect for querying the HTML from a page. That’s when we ran across a project called phpQuery:

Below is an example of a method that gets executed by the Tester module and uses phpQuery to query the contents of the page:

public function test_goto_page()
{
 //http://code.google.com/p/phpquery/wiki/Manual
 $post['test']= 'test';
 $home = $load_page('home', $post);

 $test = pq("#content")->size();
 $expected = 1;
 $run($test, $expected, 'Test for content node');

 $test = pq("#logo")->size();
 $expected = 1;
 $run($test, $expected, 'Test for logo node');
}

The results:

Thank you to all who have expressed interest in FUEL CMS — we’ve been pleasantly surprised. If you’d like to stay up to date, please don’t forget to sign up for our FUEL newsletter. We’ll be sending out periodic updates on the FUEL front so stay tuned.

Newsletter

Sign up for the Daylight Newsletter to receive helpful blog posts, insights and featured client projects.

More Articles

Daylight X OVO: Strategic agency partnership

Daylight News

The Connected History of Google, Mobile SEO, and Rankings

Insights

Aurea Worx: Transforming the Customer Experience from Puzzling to Personalized

Client Stories

Our Clients

Aurea Logo
Wacom Logo
Chateau Ste Michelle Logo
Ste. Michelle Logo
SheerID Logo
Hanzo Logo
Black and decker Logo
Zapproved Logo
Marchex Logo
Pacvue logo
Burley Logo
Nike Logo
Coca-Cola Logo
Intel Logo
Providence Logo
Webtrends Logo
Sutter Home Logo
Trinchero Logo
Dakine Logo
Newmans Own Logo
Brooks Logo
DeWALT Logo