Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542
This commit is contained in:
parent
3b2511d96d
commit
81ccda77eb
2155 changed files with 54307 additions and 46870 deletions
|
@ -10,6 +10,7 @@ namespace Drupal\simpletest;
|
|||
use Drupal\Component\Serialization\Json;
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Component\Utility\Xss;
|
||||
use Drupal\Core\Render\RenderContext;
|
||||
use Symfony\Component\CssSelector\CssSelector;
|
||||
|
||||
/**
|
||||
|
@ -397,7 +398,7 @@ trait AssertContentTrait {
|
|||
if (!$message) {
|
||||
$message = SafeMarkup::format('Raw "@raw" found', array('@raw' => $raw));
|
||||
}
|
||||
return $this->assert(strpos($this->getRawContent(), $raw) !== FALSE, $message, $group);
|
||||
return $this->assert(strpos($this->getRawContent(), (string) $raw) !== FALSE, $message, $group);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -424,7 +425,7 @@ trait AssertContentTrait {
|
|||
if (!$message) {
|
||||
$message = SafeMarkup::format('Raw "@raw" not found', array('@raw' => $raw));
|
||||
}
|
||||
return $this->assert(strpos($this->getRawContent(), $raw) === FALSE, $message, $group);
|
||||
return $this->assert(strpos($this->getRawContent(), (string) $raw) === FALSE, $message, $group);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -808,7 +809,12 @@ trait AssertContentTrait {
|
|||
* TRUE on pass, FALSE on fail.
|
||||
*/
|
||||
protected function assertThemeOutput($callback, array $variables = array(), $expected = '', $message = '', $group = 'Other') {
|
||||
$output = \Drupal::theme()->render($callback, $variables);
|
||||
/** @var \Drupal\Core\Render\RendererInterface $renderer */
|
||||
$renderer = \Drupal::service('renderer');
|
||||
|
||||
$output = $renderer->executeInRenderContext(new RenderContext(), function() use ($callback, $variables) {
|
||||
return \Drupal::theme()->render($callback, $variables);
|
||||
});
|
||||
$this->verbose(
|
||||
'<hr />' . 'Result:' . '<pre>' . SafeMarkup::checkPlain(var_export($output, TRUE)) . '</pre>'
|
||||
. '<hr />' . 'Expected:' . '<pre>' . SafeMarkup::checkPlain(var_export($expected, TRUE)) . '</pre>'
|
||||
|
|
Reference in a new issue