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 1807c92 commit 4c46500
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/Illuminate/Translation/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,6 @@ protected function makeReplacements($line, array $replace)
$replace = $this->sortReplacements($replace);

foreach ($replace as $key => $value) {
$value = e($value);

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

public function testTransMethodProperlyLoadsAndRetrievesItemWithHTMLReplacements()
{
$t = new \Illuminate\Translation\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 \Illuminate\Translation\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 4c46500

Please sign in to comment.