* 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\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);
}
}