aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-03-18 13:12:09 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-03-18 14:01:50 +0100
commit1b64a84b782090d8748bef0e9c390f491669e30c (patch)
treeac046a13070032cc45c6f6e4bf31ebe9a58af77e
parent78becd5401e9300fc8e1b54dc93422ddfcc4eb4a (diff)
downloadwallabag-1b64a84b782090d8748bef0e9c390f491669e30c.tar.gz
wallabag-1b64a84b782090d8748bef0e9c390f491669e30c.tar.zst
wallabag-1b64a84b782090d8748bef0e9c390f491669e30c.zip
Improved tests
-rw-r--r--src/Wallabag/CoreBundle/Entity/Config.php4
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php1
-rw-r--r--var/SymfonyRequirements.php20
3 files changed, 18 insertions, 7 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php
index e1a2090e..e18b543b 100644
--- a/src/Wallabag/CoreBundle/Entity/Config.php
+++ b/src/Wallabag/CoreBundle/Entity/Config.php
@@ -257,7 +257,7 @@ class Config
257 /** 257 /**
258 * Set readingSpeed. 258 * Set readingSpeed.
259 * 259 *
260 * @param int $readingSpeed 260 * @param float $readingSpeed
261 * 261 *
262 * @return Config 262 * @return Config
263 */ 263 */
@@ -271,7 +271,7 @@ class Config
271 /** 271 /**
272 * Get readingSpeed. 272 * Get readingSpeed.
273 * 273 *
274 * @return int 274 * @return float
275 */ 275 */
276 public function getReadingSpeed() 276 public function getReadingSpeed()
277 { 277 {
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
index 2af93ffe..51425fe1 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
@@ -46,6 +46,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
46 $data = array( 46 $data = array(
47 'config[theme]' => 'baggy', 47 'config[theme]' => 'baggy',
48 'config[items_per_page]' => '30', 48 'config[items_per_page]' => '30',
49 'config[reading_speed]' => '0.5',
49 'config[language]' => 'en', 50 'config[language]' => 'en',
50 ); 51 );
51 52
diff --git a/var/SymfonyRequirements.php b/var/SymfonyRequirements.php
index 28b0dcdb..841338f4 100644
--- a/var/SymfonyRequirements.php
+++ b/var/SymfonyRequirements.php
@@ -425,11 +425,13 @@ class SymfonyRequirements extends RequirementCollection
425 'Change the permissions of either "<strong>app/logs/</strong>" or "<strong>var/logs/</strong>" directory so that the web server can write into it.' 425 'Change the permissions of either "<strong>app/logs/</strong>" or "<strong>var/logs/</strong>" directory so that the web server can write into it.'
426 ); 426 );
427 427
428 $this->addPhpIniRequirement( 428 if (version_compare($installedPhpVersion, '7.0.0', '<')) {
429 'date.timezone', true, false, 429 $this->addPhpIniRequirement(
430 'date.timezone setting must be set', 430 'date.timezone', true, false,
431 'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).' 431 'date.timezone setting must be set',
432 ); 432 'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).'
433 );
434 }
433 435
434 if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) { 436 if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) {
435 $timezones = array(); 437 $timezones = array();
@@ -677,6 +679,14 @@ class SymfonyRequirements extends RequirementCollection
677 'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).' 679 'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).'
678 ); 680 );
679 681
682 if (class_exists('Symfony\Component\Intl\Intl')) {
683 $this->addRecommendation(
684 \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(),
685 sprintf('intl ICU version installed on your system (%s) should match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()),
686 'In most cases you should be fine, but please verify there is no inconsistencies between data provided by Symfony and the intl extension. See https://github.com/symfony/symfony/issues/15007 for an example of inconsistencies you might run into.'
687 );
688 }
689
680 $this->addPhpIniRecommendation( 690 $this->addPhpIniRecommendation(
681 'intl.error_level', 691 'intl.error_level',
682 create_function('$cfgValue', 'return (int) $cfgValue === 0;'), 692 create_function('$cfgValue', 'return (int) $cfgValue === 0;'),