<?php
class Kwc_Mail_Placeholder_Content_Component extends Kwc_Abstract
{
    public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer = null)
    {
        $ret = parent::getTemplateVars();
        if ($renderer && $renderer instanceof Kwf_Component_Renderer_Mail) {
            $user = $renderer->getRecipient();
            $ret['username'] = $user ? $user->getMailLastname() : 'noname';
        }
        return $ret;
    }
}

<?php
class Kwc_Mail_Placeholder_Content_Component extends Kwc_Abstract
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['viewCache'] = false;
        return $ret;
    }

    public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer = null)
    {
        $ret = parent::getTemplateVars();
        if ($renderer && $renderer instanceof Kwf_Component_Renderer_Mail) {
            $user = $renderer->getRecipient();
            $ret['username'] = $user ? $user->getMailLastname() : 'noname';
        }
        return $ret;
    }
}

Fix test, disable view cache as getTemplateVars is dynamic
Fix test, disable view cache as getTemplateVars is dynamic

before view cache was disabled for the whole test
