Created
March 6, 2013 00:40
-
-
Save cbiggins/5095759 to your computer and use it in GitHub Desktop.
my failed test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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