Skip to content

Commit

Permalink
RRR
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Segall committed Jan 21, 2015
1 parent 2d2953a commit ceaaa0f
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions message.test
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ class MessageArgumentsTestCase extends DrupalWebTestCase {
* Testing ctools message arguments plugin.
*/
public function testCtoolsArguments() {
drupal_static_reset();
debug(entity_get_info());
// $query = new EntityFieldQuery();
// $reqults = $query
Expand All @@ -447,23 +448,23 @@ class MessageArgumentsTestCase extends DrupalWebTestCase {
// $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.');
//
//
// $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 ceaaa0f

Please sign in to comment.