Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 4, 2018
1 parent 8bc9784 commit e626ab3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Translation/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ protected function makeReplacements($line, array $replace)
$replace = $this->sortReplacements($replace);

foreach ($replace as $key => $value) {
$value = $value instanceof HtmlString ? $value->toHtml() : e($value);
// $value = $value instanceof HtmlString ? $value->toHtml() : e($value);

$line = str_replace(
[':'.$key, ':'.Str::upper($key), ':'.Str::ucfirst($key)],
Expand Down
12 changes: 6 additions & 6 deletions tests/Translation/TranslationTranslatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public function testGetMethodProperlyLoadsAndRetrievesItem()
$this->assertEquals('foo', $t->get('foo::bar.foo'));
}

public function testTransMethodProperlyLoadsAndRetrievesItemWithHTMLReplacements()
{
$t = new Translator($this->getLoader(), 'en');
$t->getLoader()->shouldReceive('load')->once()->with('en', 'foo', '*')->andReturn(['bar' => 'breeze :foo']);
$this->assertSame('breeze &lt;p&gt;test&lt;/p&gt;', $t->trans('foo.bar', ['foo' => '<p>test</p>'], 'en'));
}
// public function testTransMethodProperlyLoadsAndRetrievesItemWithHTMLReplacements()
// {
// $t = new Translator($this->getLoader(), 'en');
// $t->getLoader()->shouldReceive('load')->once()->with('en', 'foo', '*')->andReturn(['bar' => 'breeze :foo']);
// $this->assertSame('breeze &lt;p&gt;test&lt;/p&gt;', $t->trans('foo.bar', ['foo' => '<p>test</p>'], 'en'));
// }

public function testTransMethodProperlyLoadsAndRetrievesItemWithHTMLInTheMessage()
{
Expand Down

0 comments on commit e626ab3

Please sign in to comment.