public function realistic_dummy_content_DatabaseTestCase::testRecipe in Realistic Dummy Content 7
File
- api/
tests/ realistic_dummy_content_api.db.test, line 177 - This file contains the testing code which requires the database. These tests are slower than the unit tests so we want to limit them.
Class
- realistic_dummy_content_DatabaseTestCase
- The test case
Code
public function testRecipe() {
$this
->assertTrue(module_load_include('inc', 'realistic_dummy_content_api', 'realistic_dummy_content_api.drush'), 'drush file exists');
$this
->assertTrue(class_exists('RealisticDummyContentDrushAPILog'), 'The drush log class exists; it is required when running drush generate-realistic or other drush commands');
$this
->assertTrue(class_exists('RealisticDummyContentDebugLog'), 'The RealisticDummyContentDebugLog class exists, thereby preventing a fatal error.');
realistic_dummy_content_api_apply_recipe(new RealisticDummyContentDebugLog());
$page = node_load(4);
$article = node_load(14);
$this
->assertTrue(isset($page->type) && $page->type == 'page', 'Node 4 is a page, as specified in the recipe.');
$this
->assertTrue(isset($article->type) && $article->type == 'article', 'Node 14 is an article, as specified in the recipe.');
}