* initial commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace AppTest\Service;
|
||||
|
||||
use App\Service\CameraPictureManagerService;
|
||||
use App\Service\CameraPictureManagerServiceFactory;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
class CameraPictureManagerServiceFactoryTest extends TestCase
|
||||
{
|
||||
/** @var ContainerInterface */
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
* @throws \Psr\Container\ContainerExceptionInterface
|
||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->container = $this->prophesize(ContainerInterface::class);
|
||||
$this->container->get("config")->willReturn(['application'=>[]]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Psr\Container\ContainerExceptionInterface
|
||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||
*/
|
||||
public function testFactory()
|
||||
{
|
||||
$factory = new CameraPictureManagerServiceFactory();
|
||||
$this->assertInstanceOf(CameraPictureManagerServiceFactory::class, $factory);
|
||||
|
||||
$cameraPictureManager = $factory($this->container->reveal());
|
||||
$this->assertInstanceOf(CameraPictureManagerService::class, $cameraPictureManager);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user