public function testSendEmailValidation()
{
$table = TableRegistry::get('CakeDC/Users.Users');
$user = $table->newEntity(['first_name' => 'FirstName', 'email' => '[email protected]', 'token' => '12345']);
$email = new Email(['from' => '[email protected]', 'transport' => 'test', 'emailFormat' => 'both']);
$this->EmailSender->expects($this->once())->method('getMailer')->with('CakeDC/Users.Users')->will($this->returnValue($this->UserMailer));
$this->UserMailer->expects($this->once())->method('send')->with('validation', [$user, 'Your account validation link']);
$this->EmailSender->sendValidationEmail($user, $email);
}