Updated Travis-CI

This commit is contained in:
kolaente 2016-07-27 11:52:28 +02:00
parent 661b88f6bc
commit bb651db1c1
3 changed files with 24 additions and 3 deletions

View File

@ -4,4 +4,4 @@ php:
- '5.5'
- '5.6'
- '7.0'
script: phpunit lang.class.php
script: phpunit test.php

View File

@ -1,7 +1,5 @@
<?php
namespace lang;
class lang
{
private $lang;

23
test.php Normal file
View File

@ -0,0 +1,23 @@
<?php
require 'lang.class.php';
$lang = new lang();
$lang->setLangFolder('examples/langs/');
$lang->setLang('examples/lang.es.php', 'es');
$lang->setCurrentLang('de');
echo $lang->get('Home').'<br/>';
echo $lang->get('something').'<br/>';
echo $lang->get('Home is where your wifi connects automatically').'<br/>';//Get Languagestring by Languagestring
$lang->setLang('examples/lang.de_extra.php', 'de');
echo $lang->get('fail');
echo '<pre>';
print_r($lang->getAll());
echo '</pre>';
$lang->set('Test in english', 'test', 'en');
$lang->set('Test auf Deutsch', 'test', 'de');
echo $lang->get('test');