]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Improved tests 1767/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 18 Mar 2016 12:12:09 +0000 (13:12 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 18 Mar 2016 13:01:50 +0000 (14:01 +0100)
src/Wallabag/CoreBundle/Entity/Config.php
src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
var/SymfonyRequirements.php

index e1a2090e54e68cfc0e235b59fbc9cb41f9abe734..e18b543b19070c5271d1ffc9a13f05e341a6abcd 100644 (file)
@@ -257,7 +257,7 @@ class Config
     /**
      * Set readingSpeed.
      *
-     * @param int $readingSpeed
+     * @param float $readingSpeed
      *
      * @return Config
      */
@@ -271,7 +271,7 @@ class Config
     /**
      * Get readingSpeed.
      *
-     * @return int
+     * @return float
      */
     public function getReadingSpeed()
     {
index 2af93ffecffe7051dfc114a453b297def5b86189..51425fe1c51ae3da4e487c9f9f24e38202ef85fe 100644 (file)
@@ -46,6 +46,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
         $data = array(
             'config[theme]' => 'baggy',
             'config[items_per_page]' => '30',
+            'config[reading_speed]' => '0.5',
             'config[language]' => 'en',
         );
 
index 28b0dcdbfcd82a6265fa39f57325fbf46747ce09..841338f443bebd1c6ef1fb9490fc05fa00d81800 100644 (file)
@@ -425,11 +425,13 @@ class SymfonyRequirements extends RequirementCollection
             'Change the permissions of either "<strong>app/logs/</strong>" or  "<strong>var/logs/</strong>" directory so that the web server can write into it.'
         );
 
-        $this->addPhpIniRequirement(
-            'date.timezone', true, false,
-            'date.timezone setting must be set',
-            'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).'
-        );
+        if (version_compare($installedPhpVersion, '7.0.0', '<')) {
+            $this->addPhpIniRequirement(
+                'date.timezone', true, false,
+                'date.timezone setting must be set',
+                'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).'
+            );
+        }
 
         if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) {
             $timezones = array();
@@ -677,6 +679,14 @@ class SymfonyRequirements extends RequirementCollection
                 'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).'
             );
 
+            if (class_exists('Symfony\Component\Intl\Intl')) {
+                $this->addRecommendation(
+                    \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(),
+                    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()),
+                    '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.'
+                );
+            }
+
             $this->addPhpIniRecommendation(
                 'intl.error_level',
                 create_function('$cfgValue', 'return (int) $cfgValue === 0;'),