daily-ci-api/test/AppTest/Action/JcatPackageFactoryTest.php
2017-03-23 18:46:04 +01:00

31 lines
880 B
PHP

<?php
namespace AppTest\Action;
use App\Action\JcatPackageAction;
use App\Action\JcatPackageFactory;
use App\Service\CiExecutorService;
use Interop\Container\ContainerInterface;
class JcatPackageFactoryTest extends \PHPUnit_Framework_TestCase
{
/** @var ContainerInterface */
protected $container;
protected function setUp()
{
$this->container = $this->prophesize(ContainerInterface::class);
$ciExecutorService = $this->prophesize(CiExecutorService::class);
$this->container->get(CiExecutorService::class)->willReturn($ciExecutorService);
}
public function testFactory()
{
$factory = new JcatPackageFactory();
$this->assertTrue($factory instanceof JcatPackageFactory);
$actionPage = $factory($this->container->reveal());
$this->assertTrue($actionPage instanceof JcatPackageAction);
}
}