Skip to content

Commit

Permalink
Try.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Segall committed Jan 25, 2015
1 parent dae7595 commit 26b4219
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions message.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,32 @@ class MessageArgumentsTestCase extends DrupalWebTestCase {
*/
public function testCtoolsArguments() {
module_enable(array('message_example'));
// $query = new EntityFieldQuery();
// $reqults = $query
// ->entityCondition('entity_type', 'message_type')
// ->execute();
//
// if ($reqults['message_type']) {
// $foo = entity_load('message_type', array_keys($reqults['message_type']));
// debug($foo);
// }
//
//
// $uri = entity_uri('user', $this->user);
//
// $message = message_create('example_arguments', array('uid' => $this->user->uid));
// $message->save();
//
// $arguments = message_get_message_arguments_handler($message)->getArguments();
//
// $expected_arguments = array(
// '@name' => $this->user->name,
// '%time' => format_date($message->timestamp),
// '!link' => l(t('link'), $uri['path'], array('absolute' => TRUE)),
// );
//
// // Verify we got the correct arguments.
// $this->assertEqual($arguments, $expected_arguments, 'The arguments plugin returned the expected values.');
$query = new EntityFieldQuery();
$reqults = $query
->entityCondition('entity_type', 'message_type')
->execute();

if ($reqults['message_type']) {
$foo = entity_load('message_type', array_keys($reqults['message_type']));
debug($foo);
}


$uri = entity_uri('user', $this->user);

$message = message_create('example_arguments', array('uid' => $this->user->uid));
$message->save();

$arguments = message_get_message_arguments_handler($message)->getArguments();

$expected_arguments = array(
'@name' => $this->user->name,
'%time' => format_date($message->timestamp),
'!link' => l(t('link'), $uri['path'], array('absolute' => TRUE)),
);

// Verify we got the correct arguments.
$this->assertEqual($arguments, $expected_arguments, 'The arguments plugin returned the expected values.');
}

}
Expand Down

0 comments on commit 26b4219

Please sign in to comment.