* added some example tests

This commit is contained in:
Dávid Danyi
2017-03-23 18:46:04 +01:00
parent c28fe6bd96
commit 217c1b599f
5 changed files with 219 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
<?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);
}
}