use Drupal\Component\Render\MarkupInterface;
use Drupal\Component\Render\MarkupTrait;
use Drupal\Component\Utility\UrlHelper;
-use Drupal\Tests\UnitTestCase;
+use PHPUnit\Framework\TestCase;
/**
* Tests marking strings as safe.
* @group Utility
* @coversDefaultClass \Drupal\Component\Utility\SafeMarkup
*/
-class SafeMarkupTest extends UnitTestCase {
+class SafeMarkupTest extends TestCase {
/**
* {@inheritdoc}
* @covers ::isSafe
*/
public function testIsSafe() {
- $safe_string = $this->getMock('\Drupal\Component\Render\MarkupInterface');
+ $safe_string = $this->getMockBuilder('\Drupal\Component\Render\MarkupInterface')->getMock();
$this->assertTrue(SafeMarkup::isSafe($safe_string));
$string_object = new SafeMarkupTestString('test');
$this->assertFalse(SafeMarkup::isSafe($string_object));