<?php

namespace Planaday\Html\Tags\Test\EnclosingTestTag;

use Planaday\Html\Tags\Tag;
use Planaday\Utility\DependencyInjection\Container;
use Planaday\Utility\DependencyInjection\InjectionImpossibleException;

class EnclosingTest extends Tag {
	const TAG = 'enclosing-test';
	const DEFAULT_TEMPLATE = 'enclosingTestTag';

	/**
	 * @param Container $registry
	 *
	 * @throws InjectionImpossibleException
	 */
	public function __construct(Container $registry) {
		parent::__construct(__DIR__, self::DEFAULT_TEMPLATE, $registry);
	}

	public function buildTag(): string {
		$parser = $this->getNewParser();
		return $parser->parse($this->getTemplate());
	}
}