You are here

public function CommerceMessageTokenTest::testCloneHasToken in Commerce Message 7

File

./commerce_message.test, line 500

Class

CommerceMessageTokenTest

Code

public function testCloneHasToken() {
  $this
    ->drupalLogin($this->store_admin);
  $edit = array(
    'name' => 'commerce_order_order_confirmation_cloned_',
    'description' => 'Commerce Order: order confirmation (cloned)',
  );
  $this
    ->drupalPost('admin/structure/messages/manage/commerce_order_order_confirmation/clone', $edit, t('Save message type'));
  if (!message_type_load('commerce_order_order_confirmation_cloned_')) {
    $this
      ->fail('Failed to clone the message type');
  }
  $this
    ->drupalGet('admin/structure/messages/manage/commerce_order_order_confirmation_cloned_/fields');
  $this
    ->assertText('message_commerce_order');
}