* added some example tests
This commit is contained in:
30
test/AppTest/Action/JcatPackageFactoryTest.php
Normal file
30
test/AppTest/Action/JcatPackageFactoryTest.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user