mirror of
https://github.com/retailcrm/transparent-email.git
synced 2024-11-22 05:16:05 +03:00
29 lines
728 B
PHP
29 lines
728 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace bkrukowski\TransparentEmail\Tests;
|
|
|
|
use bkrukowski\TransparentEmail\ServiceCollector;
|
|
use bkrukowski\TransparentEmail\Services\ServiceInterface;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class ServiceCollectorTest extends TestCase
|
|
{
|
|
public function testAddService()
|
|
{
|
|
$service = $this->createMock(ServiceInterface::class);
|
|
$collector = new ServiceCollector();
|
|
$collector->addService($service);
|
|
|
|
$contains = false;
|
|
foreach ($collector->getIterator() as $currentService) {
|
|
if ($currentService === $service) {
|
|
$contains = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
$this->assertTrue($contains);
|
|
}
|
|
} |