2018-12-03 23:39:50 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Engelsystem\Test\Unit\Renderer;
|
|
|
|
|
|
|
|
use Engelsystem\Test\Unit\Renderer\Stub\EngineImplementation;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
class EngineTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @covers \Engelsystem\Renderer\Engine::share
|
|
|
|
*/
|
2022-12-14 19:15:20 +01:00
|
|
|
public function testShare(): void
|
2018-12-03 23:39:50 +01:00
|
|
|
{
|
|
|
|
$engine = new EngineImplementation();
|
|
|
|
$engine->share(['foo' => ['bar' => 'baz', 'lorem' => 'ipsum']]);
|
|
|
|
$engine->share(['foo' => ['lorem' => 'dolor']]);
|
|
|
|
$engine->share('key', 'value');
|
|
|
|
|
|
|
|
$this->assertEquals(
|
|
|
|
['foo' => ['bar' => 'baz', 'lorem' => 'dolor'], 'key' => 'value'],
|
|
|
|
$engine->getSharedData()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|