Skip to content

Commit

Permalink
Changes recommanded by PSR-1 : Required files are available through c…
Browse files Browse the repository at this point in the history
…omposer autoload
  • Loading branch information
defro committed Jan 9, 2017
1 parent b708f5a commit 0d8e80e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
6 changes: 5 additions & 1 deletion composer.json
Expand Up @@ -28,6 +28,10 @@
"classmap": ["src/"],
"psr-4": {
"CodeIgniterGetText\\Tests\\": "tests/"
}
},
"files": [
"tests/include/gettext_test_functions.php",
"tests/include/gettext_test_constants.php"
]
}
}
2 changes: 1 addition & 1 deletion src/helpers/gettext_helper.php
Expand Up @@ -42,6 +42,6 @@ function _e($expression)
*/
function _n($expression_singular, $expression_plural, $number)
{
return (ngettext($expression_singular, $expression_plural, (int)$number));
return (ngettext($expression_singular, $expression_plural, (int) $number));
}
}
11 changes: 0 additions & 11 deletions tests/LibraryTest.php
@@ -1,9 +1,6 @@
<?php
namespace CodeIgniterGetText\Tests;

require_once('include/gettext_test_functions.php');
require_once('include/gettext_test_constants.php');

class LibraryTest extends \PHPUnit_Framework_TestCase
{

Expand Down Expand Up @@ -54,14 +51,6 @@ public function testFileExists()
private function _library()
{
$config = array();
/*
$config = array(
'gettext_locale_dir' => $CI->config->item('gettext_locale_dir'),
'gettext_text_domain' => $CI->config->item('gettext_text_domain'),
'gettext_catalog_codeset' => $CI->config->item('gettext_catalog_codeset'),
'gettext_locale' => $CI->config->item('gettext_locale')
);
*/

// Load default config array
require(realpath(dirname(__FILE__) . '/../') . '/src/config/gettext.php');
Expand Down
3 changes: 0 additions & 3 deletions tests/TranslationTest.php
@@ -1,9 +1,6 @@
<?php
namespace CodeIgniterGetText\Tests;

require_once('include/gettext_test_functions.php');
require_once('include/gettext_test_constants.php');

class TranslationTest extends \PHPUnit_Framework_TestCase
{
const EXPRESSION = "Let me test this expression";
Expand Down

0 comments on commit 0d8e80e

Please sign in to comment.