31 lines
852 B
PHP
31 lines
852 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace AppTest\Action;
|
||
|
|
|
||
|
|
use App\Action\CiConfigAction;
|
||
|
|
use App\Action\CiConfigFactory;
|
||
|
|
use App\Service\CiConfigService;
|
||
|
|
use Interop\Container\ContainerInterface;
|
||
|
|
|
||
|
|
class CiConfigFactoryTest extends \PHPUnit_Framework_TestCase
|
||
|
|
{
|
||
|
|
/** @var ContainerInterface */
|
||
|
|
protected $container;
|
||
|
|
|
||
|
|
protected function setUp()
|
||
|
|
{
|
||
|
|
$this->container = $this->prophesize(ContainerInterface::class);
|
||
|
|
$ciConfigService = $this->prophesize(CiConfigService::class);
|
||
|
|
|
||
|
|
$this->container->get(CiConfigService::class)->willReturn($ciConfigService);
|
||
|
|
}
|
||
|
|
|
||
|
|
public function testFactory()
|
||
|
|
{
|
||
|
|
$factory = new CiConfigFactory();
|
||
|
|
$this->assertTrue($factory instanceof CiConfigFactory);
|
||
|
|
$actionPage = $factory($this->container->reveal());
|
||
|
|
$this->assertTrue($actionPage instanceof CiConfigAction);
|
||
|
|
}
|
||
|
|
}
|