lithium\test\Mocker::_dynamicCode PHP Method

_dynamicCode() protected static method

This pulls from $_mockDelegateIngredients and $_mockIngredients.
protected static _dynamicCode ( string $type, string $key, array $tokens = [] ) : string
$type string The name of the array of ingredients to use
$key string The key from the array of ingredients
$tokens array Tokens, if any, that should be inserted
return string
    protected static function _dynamicCode($type, $key, $tokens = array())
    {
        $defaults = array('master' => '\\lithium\\test\\Mocker');
        $tokens += $defaults;
        $name = '_' . $type . 'Ingredients';
        $code = implode("\n", self::${$name}[$key]);
        return String::insert($code, $tokens) . "\n";
    }