Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace placeholders even if the string is not in the language content #2080

Merged
merged 10 commits into from Feb 23, 2014
Prev Previous commit
Next Next commit
Test case for #2044
  • Loading branch information
sjinks committed Feb 23, 2014
commit 5c8700d62bd42eb1a654134b54efe4c5622d3ae2
11 changes: 11 additions & 0 deletions ext/tests/issue-2044.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--TEST--
Replace varnames of empty language content - https://github.com/phalcon/cphalcon/issues/2044
--SKIPIF--
<?php include('skipif.inc');
--FILE--
<?php
$t = new Phalcon\Translate\Adapter\NativeArray(array('content' => array()));
echo $t->_("Hello %varname%", array('varname' => 'world')), PHP_EOL;
?>
--EXPECT--
Hello world