mirror of
https://github.com/envoyr/nginx-configurator.git
synced 2026-04-28 12:24:08 +00:00
Added some tests and factory impl
This commit is contained in:
32
tests/spec/FactorySpec.php
Normal file
32
tests/spec/FactorySpec.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace spec\Madkom\NginxConfigurator;
|
||||
|
||||
use Madkom\NginxConfigurator\Config\Location;
|
||||
use Madkom\NginxConfigurator\Config\Server;
|
||||
use Madkom\NginxConfigurator\Factory;
|
||||
use PhpSpec\ObjectBehavior;
|
||||
use Prophecy\Argument;
|
||||
|
||||
/**
|
||||
* Class FactorySpec
|
||||
* @package spec\Madkom\NginxConfigurator
|
||||
* @author Michał Brzuchalski <m.brzuchalski@madkom.pl>
|
||||
* @mixin Factory
|
||||
*/
|
||||
class FactorySpec extends ObjectBehavior
|
||||
{
|
||||
function it_is_initializable()
|
||||
{
|
||||
$this->shouldHaveType(Factory::class);
|
||||
}
|
||||
|
||||
function it_can_create_Server_node()
|
||||
{
|
||||
$this->createServer(80)->shouldReturnAnInstanceOf(Server::class);
|
||||
}
|
||||
|
||||
function it_can_create_Location_node()
|
||||
{
|
||||
$this->createLocation('/test', '~')->shouldReturnAnInstanceOf(Location::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user