Skip to content

Instantly share code, notes, and snippets.

@cbiggins
Created March 6, 2013 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbiggins/5095759 to your computer and use it in GitHub Desktop.
Save cbiggins/5095759 to your computer and use it in GitHub Desktop.
my failed test
<?php
/**
* @file
* Our simpletests for the FMA install profile.
* @copyright Copyright(c) 2012 Previous Next Pty Ltd
* @license GPL v2 http://www.fsf.org/licensing/licenses/gpl.html
* @author Christian Biggins christian at previousnext dot com dot au
*/
class FMATestCase extends DrupalWebTestCase {
/** Make sure SimpleTest knows which profile to install **/
protected $profile = 'FMA';
protected $privileged_user;
/**
* Our test info.
*/
public static function getInfo() {
// Note: getInfo() strings are not translated with t().
return array(
'name' => 'FMA Install Profile',
'description' => 'General tests for install profile.',
'group' => 'FMA',
);
}
/**
* Our setup.
*/
protected function setUp() {
debug('setup start');
parent::setUp(array('dblog', 'fma_taxonomy', 'fma_show'));
debug('setup mid');
// Create and log in our privileged user.
$this->privileged_user = $this->drupalCreateUser(array('administer nodes', 'administer modules'));
$this->drupalLogin($this->privileged_user);
debug('setup end');
}
/**
* Test our content type.
*/
public function testShowPropeties() {
$settings = array(
'type' => 'fma_show',
'title' => $this->randomName(32),
'body' => array(LANGUAGE_NONE => array(array($this->randomName(64)))),
);
$node = $this->drupalCreateNode($settings);
// Content type exists.
$this->assertTrue(!empty($node), 'Test node created.');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment