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
* @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)
* @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)