mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-09 07:24:55 +02:00
22 lines
553 B
PHP
22 lines
553 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Tests\Mediator\Tests;
|
|
|
|
use DesignPatterns\Behavioral\Mediator\Ui;
|
|
use DesignPatterns\Behavioral\Mediator\UserRepository;
|
|
use DesignPatterns\Behavioral\Mediator\UserRepositoryUiMediator;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class MediatorTest extends TestCase
|
|
{
|
|
public function testOutputHelloWorld()
|
|
{
|
|
$mediator = new UserRepositoryUiMediator(new UserRepository(), new Ui());
|
|
|
|
$this->expectOutputString('User: Dominik');
|
|
$mediator->printInfoAbout('Dominik');
|
|
}
|
|
}
|