Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / config / Tests / Definition / Builder / NumericNodeDefinitionTest.php
index efe0f19482cb20c004854514dfc57df22f2780ee..31342503d8d08084d8989556925a7c793e05c9ff 100644 (file)
@@ -12,9 +12,9 @@
 namespace Symfony\Component\Config\Tests\Definition\Builder;
 
 use PHPUnit\Framework\TestCase;
-use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition as NumericNodeDefinition;
-use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition;
 use Symfony\Component\Config\Definition\Builder\FloatNodeDefinition;
+use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition;
+use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition as NumericNodeDefinition;
 
 class NumericNodeDefinitionTest extends TestCase
 {
@@ -91,4 +91,14 @@ class NumericNodeDefinitionTest extends TestCase
         $node = $def->min(3.0)->max(7e2)->getNode();
         $this->assertEquals(4.5, $node->finalize(4.5));
     }
+
+    /**
+     * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException
+     * @expectedExceptionMessage ->cannotBeEmpty() is not applicable to NumericNodeDefinition.
+     */
+    public function testCannotBeEmptyThrowsAnException()
+    {
+        $def = new NumericNodeDefinition('foo');
+        $def->cannotBeEmpty();
+    }
 }