Skip to content

Commit

Permalink
added new test
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.php.net/repository/pear/packages/Translation2/trunk@197585 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
quipo committed Oct 4, 2005
1 parent ac4a38b commit 088b2af
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/db_test.php
Expand Up @@ -277,6 +277,18 @@ function testCacheMemoryDecorator() {
$this->assertEqual($v, $this->tr->get('hello_user'));
}
}
function testMultipleDecorators() {
$this->tr->setLang('en');
$this->assertEqual(null, $this->tr->get('only_italian'));
$this->tr =& $this->tr->getDecorator('Lang');
$this->tr->setOption('fallbackLang', 'de');
$this->assertEqual(null, $this->tr->get('only_italian'));
//in-between decorator
$this->tr =& $this->tr->getDecorator('Iconv');
//set option of the Lang decorator, passing through the Iconv decorator
$this->tr->setOption('fallbackLang', 'it');
$this->assertEqual('testo solo in italiano', $this->tr->get('only_italian'));
}
}

if (!defined('TEST_RUNNING')) {
Expand Down

0 comments on commit 088b2af

Please sign in to comment.