Security update for Core, with self-updated composer
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Entity / ContentEntityBaseUnitTest.php
index 8ab7950f0222ca3a1689b03fcd270faf23b4b216..541ec88e2a42534f3baa0d8a55503f6ad5dd3700 100644 (file)
@@ -10,6 +10,7 @@ use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\TypedData\TypedDataManagerInterface;
 use Drupal\Tests\UnitTestCase;
 use Drupal\Core\Language\Language;
+use Symfony\Component\Validator\Validator\ValidatorInterface;
 
 /**
  * @coversDefaultClass \Drupal\Core\Entity\ContentEntityBase
@@ -327,7 +328,7 @@ class ContentEntityBaseUnitTest extends UnitTestCase {
    * @covers ::validate
    */
   public function testValidate() {
-    $validator = $this->getMock('\Symfony\Component\Validator\ValidatorInterface');
+    $validator = $this->getMock(ValidatorInterface::class);
     /** @var \Symfony\Component\Validator\ConstraintViolationList|\PHPUnit_Framework_MockObject_MockObject $empty_violation_list */
     $empty_violation_list = $this->getMockBuilder('\Symfony\Component\Validator\ConstraintViolationList')
       ->setMethods(NULL)
@@ -360,7 +361,7 @@ class ContentEntityBaseUnitTest extends UnitTestCase {
    * @covers ::preSave
    */
   public function testRequiredValidation() {
-    $validator = $this->getMock('\Symfony\Component\Validator\ValidatorInterface');
+    $validator = $this->getMock(ValidatorInterface::class);
     /** @var \Symfony\Component\Validator\ConstraintViolationList|\PHPUnit_Framework_MockObject_MockObject $empty_violation_list */
     $empty_violation_list = $this->getMockBuilder('\Symfony\Component\Validator\ConstraintViolationList')
       ->setMethods(NULL)