for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Timegryd\OpcacheResetBundle\Tests\DependencyInjection;
use Symfony\Component\Config\Definition\Processor;
use Timegryd\OpcacheResetBundle\DependencyInjection\Configuration;
class ConfigurationTest extends \PHPUnit\Framework\TestCase
{
/**
* @var Configuration
*/
protected $configuration;
* @var Processor
protected $processor;
protected function setUp()
$this->configuration = new Configuration();
$this->processor = new Processor();
}
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
public function testEmpty()
$this->processor->processConfiguration($this->configuration, []);
public function testHostRequired()
$this->processor->processConfiguration($this->configuration, [
'timegryd-opcache-reset' => [],
]);
public function testDirRequired()
'timegryd-opcache-reset' => [
'host' => 'example.com',
],
public function testSuccess()
$actual = $this->processor->processConfiguration($this->configuration, [
'timegryd_opcache_reset' => [
'dir' => 'web-dir',
$expected = [
];
$this->assertEquals($expected, $actual);