| 1 |
|
<?php |
| 2 |
|
|
| 3 |
|
class NodeFactoryDrushMmBase extends DrupalTestCase { |
| 4 |
|
} |
| 5 |
|
|
| 6 |
|
class NodeFactoryDrushMmTest extends NodeFactoryDrushMmBase { |
| 7 |
|
function get_info() { |
| 8 |
|
return array( |
| 9 |
|
'name' => t('Node Factory Drush Module Manager Integration'), |
| 10 |
|
'description' => t('Test the integration with drush mm'), |
| 11 |
|
'group' => t('Node Factory Tests'), |
| 12 |
|
); |
| 13 |
|
} |
| 14 |
|
|
| 15 |
|
function testCreateWithJson() { |
| 16 |
|
if ($this->assertFalse( !module_exists('drush_mm'), 'drush module manager module enabled')) { |
| 17 |
|
_node_factory_create_node_json( '{"type":"story","title":"denis cahuk","body":"ljub","uid":1}'); |
| 18 |
|
} |
| 19 |
|
} |
| 20 |
|
|
| 21 |
|
function testCreateWithPhp() { |
| 22 |
|
if ($this->assertFalse( !module_exists('drush_mm'), 'drush module manager module enabled')) { |
| 23 |
|
// _node_factory_create_node_php( module_); |
| 24 |
|
} |
| 25 |
|
} |
| 26 |
|
|
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
if (!function_exists('drush_verbose')) { |
| 30 |
|
function drush_verbose( $s) { |
| 31 |
|
echo $s; |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
function drush_die( $s) { |
| 35 |
|
die($s); |
| 36 |
|
} |
| 37 |
|
} |