Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023

This commit is contained in:
Pantheon Automation 2015-09-04 13:20:09 -07:00 committed by Greg Anderson
parent 2720a9ec4b
commit f3791f1da3
1898 changed files with 54300 additions and 11481 deletions

View file

@ -0,0 +1,54 @@
<?php
/**
* @file
* Contains \Drupal\Tests\simpletest\Unit\AssertContentTraitTest.
*/
namespace Drupal\Tests\simpletest\Unit;
use Drupal\simpletest\AssertContentTrait;
use Drupal\Tests\UnitTestCase;
/**
* @coversDefaultClass \Drupal\simpletest\AssertContentTrait
* @group simpletest
*/
class AssertContentTraitTest extends UnitTestCase {
/**
* @covers ::getTextContent
*/
public function testGetTextContent() {
$test = new TestClass();
$raw_content = <<<EOT
<Head>
<style>
@import url("foo.css");
</style>
</head>
<body>
bar
</body>
EOT;
$test->_setRawContent($raw_content);
$this->assertNotContains('foo', $test->_getTextContent());
$this->assertNotContains('<body>', $test->_getTextContent());
$this->assertContains('bar', $test->_getTextContent());
}
}
class TestClass {
use AssertContentTrait;
public function _setRawContent($content) {
$this->setRawContent($content);
}
public function _getTextContent() {
return $this->getTextContent();
}
}

View file

@ -73,7 +73,7 @@ class TestBaseTest extends UnitTestCase {
array(FALSE, 'curry paste'),
array(TRUE, 'curry paste'),
array(TRUE, 'thai green curry paste'),
array(FALSE, '@startswithat'),
array(TRUE, '@startswithat'),
array(TRUE, 'contains@at'),
);
}
@ -117,7 +117,7 @@ class TestBaseTest extends UnitTestCase {
$this->assertEquals($length, strlen($string));
// randomString() should always include an ampersand ('&') and a
// greater than ('>') if $length is greater than 3.
if ($length > 3) {
if ($length > 4) {
$this->assertContains('&', $string);
$this->assertContains('>', $string);
}

View file

@ -218,6 +218,7 @@ class WebTestBaseTest extends UnitTestCase {
$get_absolute_url_method->setAccessible(TRUE);
$this->assertSame($expected_absolute_path, $get_absolute_url_method->invoke($web_test, $href));
unset($GLOBALS['base_url'], $GLOBALS['base_path']);
}
/**