Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / config / Tests / Definition / Builder / BooleanNodeDefinitionTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Config\Tests\Definition\Builder;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition;
16
17 class BooleanNodeDefinitionTest extends TestCase
18 {
19     /**
20      * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException
21      * @expectedExceptionMessage ->cannotBeEmpty() is not applicable to BooleanNodeDefinition.
22      */
23     public function testCannotBeEmptyThrowsAnException()
24     {
25         $def = new BooleanNodeDefinition('foo');
26         $def->cannotBeEmpty();
27     }
28
29     public function testSetDeprecated()
30     {
31         $def = new BooleanNodeDefinition('foo');
32         $def->setDeprecated('The "%path%" node is deprecated.');
33
34         $node = $def->getNode();
35
36         $this->assertTrue($node->isDeprecated());
37         $this->assertSame('The "foo" node is deprecated.', $node->getDeprecationMessage($node->getName(), $node->getPath()));
38     }
39 }