Fixed tests

This commit is contained in:
Alejandro Celaya 2016-08-15 09:52:44 +02:00
parent 9e4fb68265
commit 00c56ca594
3 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e
builtcontent=$(readlink -f '../shlink_build_tmp')
projectdir=$(pwd)
@ -28,6 +29,6 @@ rm -r build
rm data/database.sqlite
rm data/{cache,log,proxies}/{*,.gitignore}
rm config/params/{*,.gitignore}
rm config/autoload/{*.local.php{,.dist},.gitignore}
rm config/autoload/{{,*.}local.php{,.dist},.gitignore}
# Compressing file

View file

@ -3,8 +3,10 @@ namespace ShlinkioTest\Shlink\CLI\Factory;
use PHPUnit_Framework_TestCase as TestCase;
use Shlinkio\Shlink\CLI\Factory\ApplicationFactory;
use Shlinkio\Shlink\Core\Options\AppOptions;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Zend\I18n\Translator\Translator;
use Zend\ServiceManager\ServiceManager;
class ApplicationFactoryTest extends TestCase
@ -53,8 +55,10 @@ class ApplicationFactoryTest extends TestCase
{
return new ServiceManager(['services' => [
'config' => [
'cli' => $config,
'cli' => array_merge($config, ['locale' => 'en']),
],
AppOptions::class => new AppOptions(),
Translator::class => Translator::factory([]),
]]);
}
}

View file

@ -25,7 +25,6 @@ class ConfigProviderTest extends TestCase
$this->assertArrayHasKey('error_handler', $config);
$this->assertArrayHasKey('middleware_pipeline', $config);
$this->assertArrayHasKey('rest', $config);
$this->assertArrayHasKey('routes', $config);
$this->assertArrayHasKey('dependencies', $config);
$this->assertArrayHasKey('translator', $config);