diff --git a/main/inc/lib/internationalization.lib.php b/main/inc/lib/internationalization.lib.php index 481cb65302..bdb4f56c51 100644 --- a/main/inc/lib/internationalization.lib.php +++ b/main/inc/lib/internationalization.lib.php @@ -126,6 +126,9 @@ $_api_is_translated_call = false; function get_lang($variable, $reserved = null, $language = null) { global $app; + if ($app['debug']) { + //return $variable; + } $translated = $app['translator']->trans($variable); if ($translated == $variable) { $translated = $app['translator']->trans("lang$variable"); diff --git a/tests/phpunit/LearnpathControllerTest.php b/tests/phpunit/LearnpathControllerTest.php new file mode 100644 index 0000000000..021e216e08 --- /dev/null +++ b/tests/phpunit/LearnpathControllerTest.php @@ -0,0 +1,34 @@ +disable(); + $app['monolog'] = $this->getMock('Monolog\Logger'); + + return $app; + } + + /** + * @covers ChamiloLMS\Controller\LearnpathController::indexAction + * @todo Implement testIndexAction(). + */ + public function testIndexAction() + { + $client = $this->createClient(); + $crawler = $client->request('GET', '/'); + $this->assertTrue($client->getResponse()->isOk()); + $this->assertCount(1, $crawler->filter('form')); + } +}