Skip to content

Instantly share code, notes, and snippets.

@cgarvis
Created January 20, 2012 16:56
Show Gist options
  • Save cgarvis/1648372 to your computer and use it in GitHub Desktop.
Save cgarvis/1648372 to your computer and use it in GitHub Desktop.
li3 and drupal intergration
[vagrant@localhost drupal]$ drush test-run Arwen -v
Initialized Drupal 7.9 root directory at /opt/ivillage/drupal/www [notice]
Initialized Drupal site local.ivillage.com at sites/default [notice]
/usr/bin/php /usr/share/pear/drush/drush.php --php=/usr/bin/php --verbose --root=/opt/ivillage/drupal/www --uri=http://local.ivillage.com/ test-run ArwenTestCase --backend=2 2>&1 [notice]
Initialized Drupal 7.9 root directory at /opt/ivillage/drupal/www [notice]
Initialized Drupal site local.ivillage.com at sites/default [notice]
The external command could not be executed due to an application error. [error]
Command dispatch complete
<?php
function arwen_init() {
require_once(__DIR__ . '/config/bootstrap.php');
}
function arwen_library_info() {
$libraries['lithium'] = array (
'name' => 'Lithium (li3)',
'vendor url' => 'http://lithify.me/',
'path' => 'lithium',
);
return $libraries;
}
function load_person() {
$person = arwen\models\People::first();
print_r($person);exit();
}
?>
<?php
class ArwenTestCase extends DrupalUnitTestCase {
protected $_testConfig = array(
);
public static function getInfo() {
return array(
'name' => 'Arwen Core Unit Tests',
'description' => 'Test that the arwen core works properly',
'group' => 'Arwen'
);
}
public function testCreatePerson() {
$person = \arwen\models\People::create();
$this->assertTrue(is_a($person, '\lithium\data\Entity'));
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment