5 * Contains \Drupal\Tests\simpletest\Unit\AssertContentTraitTest.
8 namespace Drupal\Tests\simpletest\Unit;
10 use Drupal\simpletest\AssertContentTrait;
11 use Drupal\Tests\UnitTestCase;
14 * @coversDefaultClass \Drupal\simpletest\AssertContentTrait
17 class AssertContentTraitTest extends UnitTestCase {
20 * @covers ::getTextContent
22 public function testGetTextContent() {
23 $test = new TestClass();
28 @import url("foo.css");
35 $test->_setRawContent($raw_content);
36 $this->assertNotContains('foo', $test->_getTextContent());
37 $this->assertNotContains('<body>', $test->_getTextContent());
38 $this->assertContains('bar', $test->_getTextContent());
44 use AssertContentTrait;
46 public function _setRawContent($content) {
47 $this->setRawContent($content);
50 public function _getTextContent() {
51 return $this->getTextContent();