Skip to content

Instantly share code, notes, and snippets.

View michaeltwofish's full-sized avatar

Michael C. Harris michaeltwofish

  • South Australia, Australia
View GitHub Profile
Failing Scenarios:
cucumber -p client-admin-all client_admin/client_tag_update.feature:20 # Scenario: Rename a tag
cucumber -p client-admin-all client_admin/client_tag_update.feature:26 # Scenario: Try to rename a tag to a name that is already used
cucumber -p client-admin-all client_admin/candidate_retrieve.feature:144 # Scenario: Select a tag to filter on and submit search
cucumber -p client-admin-all client_admin/candidate_retrieve.feature:165 # Scenario: Select a tag to filter on and submit search then submit again to see tag is still checked
cucumber -p client-admin-all client_admin/candidate_retrieve.feature:191 # Scenario: Apply two tags to a candidate that is tagged with both, and make sure it is listed only once
cucumber -p client-admin-all client_admin/candidate_retrieve.feature:208 # Scenario: Select a tag to filter on and submit search then check modal
cucumber -p client-admin-all client_admin/candidate_retrieve.feature:226 # Scenario: Filter candidates by tag belonging to candidates for more than
Fatal error: Uncaught exception 'lithium\data\model\QueryException' with message 'SELECT * FROM `scores` AS `Scores` LEFT JOIN `norms` AS `Norms` ON `Scores`.`id` = `Norms`.`score_id` WHERE `test_id` = 1 AND `form_id` = 1 AND score = 5 AND Scores.id IN ();: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1' in /usr/local/www/oars/libraries/lithium/data/source/database/adapter/MySql.php on line 343
( ! ) lithium\data\model\QueryException: SELECT * FROM `scores` AS `Scores` LEFT JOIN `norms` AS `Norms` ON `Scores`.`id` = `Norms`.`score_id` WHERE `test_id` = 1 AND `form_id` = 1 AND score = 5 AND Scores.id IN ();: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 in /usr/local/www/oars/libraries/lithium/data/source/database/adapter/MySql.php on line 343
// Format the date field, leaving invalid dates alone
if ($candidate->dob != null) {
// Check if the entered date is valid
if (strtotime($candidate->dob)) {
$candidate->dob = date("d/m/Y", strtotime($candidate->dob));
}
} else {
$candidate->dob = "some new placeholder";
}
Exception thrown in lithium\data\Model::connection() on line 942
The data connection `test` is not configured.
Trace
lithium\data\Model::bind(), line 576
lithium\data\Model::_relations(), line 1021
lithium\data\Model::config(), line 358
include, line 155
lithium\core\Libraries::load(), line 468
spl_autoload_call, line ??
app\tests\cases\models\CandidatesTest::setUp(), line 14
<?php
namespace app\controllers;
use \lithium\storage\Session;
use \lithium\net\http\Router;
use \lithium\analysis\Logger;
use \acer\core\Environment;
/**
* The connection controller is for acceptance tests to tell the application it
/**
* Add the page parent control to the publish page
*
* @param FormUI $form The publish page form
* @param Post $post The post being edited
*
*/
public function action_form_publish ( $form, $post )
{
if ( $form->content_type->value == Post::type( 'imprint' ) ) {
Failing Scenarios:
cucumber -p client-admin-all client_admin/client_retrieve.feature:33 # Scenario: Visit the show page for a client that has been rejected
cucumber -p client-admin-all client_admin/candidate_test.feature:54 # Scenario: Assign a test form to a candidate
cucumber -p client-admin-all client_admin/candidate_test.feature:68 # Scenario: Assign a test form to multiple candidates
cucumber -p client-admin-all client_admin/candidate_test.feature:92 # Scenario: Select all candidates and assign a test form to them
cucumber -p client-admin-all client_admin/candidate_test.feature:117 # Scenario: Assign a test form to a candidate that is already assigned the test form
cucumber -p client-admin-all client_admin/candidate_update.feature:126 # Scenario: Update candidate "Candidate 1" and add one tag
cucumber -p client-admin-all client_admin/candidate_update.feature:159 # Scenario: Update candidate "Candidate 1" and add multiple tags
@michaeltwofish
michaeltwofish / gist:1044370
Created June 24, 2011 07:17
Verbose codepad.js install
% npm install codepad 7:12
npm info it worked if it ends with ok
npm verb cli [ 'node',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'install',
npm verb cli 'codepad' ]
npm info using [email protected]
npm info using [email protected]
npm verb config file /home/twofish/.npmrc
npm verb config file /usr/local/etc/npmrc
@michaeltwofish
michaeltwofish / gist:1016261
Created June 9, 2011 07:37
Custom lithium finder
<?php
// Create a finder for popular tags
static::finder('popular', function($self, $params, $chain) {
$params['options']['joins'] = array(new Query(array(
'source' => 'candidate_tags',
'constraint' => array ('Tag.id' => 'candidate_tags.tag_id'),
'group' => 'tag_id',
)));
$params['options']['fields'] = array('tag_id as id', 'name', 'client_id', 'count(tag_id) as theCount');
$params['options']['order'] = 'theCount DESC';
object SuperGlobal Object
(
[vocabulary] => Array
(
[tags:term] => Array
(
[0] => jdlfjks
)
)