12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- /*
- * This file is part of the Sonata package.
- *
- * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- namespace Sonata\AdminBundle\Tests;
- use Sonata\AdminBundle\DependencyInjection\Configuration;
- use Symfony\Component\Config\Definition\Processor;
- class ConfigurationTest extends \PHPUnit_Framework_TestCase
- {
- public function testOptions()
- {
- $processor = new Processor();
- $config = $processor->processConfiguration(new Configuration(), array());
- $this->assertTrue($config['options']['html5_validate']);
- $this->assertNull($config['options']['pager_links']);
- $this->assertTrue($config['options']['confirm_exit']);
- $this->assertTrue($config['options']['use_icheck']);
- }
- public function testOptionsWithInvalidFormat()
- {
- $this->setExpectedException('Symfony\Component\Config\Definition\Exception\InvalidTypeException');
- $processor = new Processor();
- $config = $processor->processConfiguration(new Configuration(), array(array(
- 'options' => array(
- 'html5_validate' => '1'
- )
- )));
- }
- }
|