Skip to content

Commit

Permalink
Add load test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarratt committed Jul 30, 2017
1 parent 0b7725e commit 5f7208f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/DependencyInjection/GeoSocioHttpSerializerExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace GeoSocio\HttpSerializerBundle\DependencyInjection;

use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* Extension Test
Expand All @@ -19,4 +21,30 @@ public function testGetAlias()

$this->assertEquals($alias, $extension->getAlias());
}

/**
* Test Load
*/
public function testLoad()
{
$definition = $this->getMockBuilder(Definition::class)
->disableOriginalConstructor()
->getMock();
$definition->method('setArguments')
->willReturnSelf();
$definition->method('setPublic')
->willReturnSelf();
$definition->method('addTag')
->willReturnSelf();

$container = $this->getMockBuilder(ContainerBuilder::class)
->disableOriginalConstructor()
->getMock();
$container->method('register')
->willReturn($definition);

$extension = new GeoSocioHttpSerializerExtension();

$this->assertNull($extension->load([], $container));
}
}

0 comments on commit 5f7208f

Please sign in to comment.