<?php

class CatalyzCheckup{
	protected $testGroups = array();
	function logTest($groupName, $testName, $result){
		$passed = '<img src="/images/catalyz/accept.png"/>';
		$failed = '<img src="/images/catalyz/error.png"/>';

		$this->testGroups[$groupName][$testName] = $result?$passed:$failed;
	}

	function execute(){
		$this->CheckDefinedSettings('app_site_url');
		$this->CheckDefinedSettings('app_static_url');

		return $this->testGroups;
	}

	public function CheckDefinedSettings($key)
	{
		$this->logTest('Configuration', sprintf('Settings "%s" is defined', $key), (sfConfig::get($key, null) !== null));
	}
}

?>