-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix test suite when ext/intl isn't available #5111
Fix test suite when ext/intl isn't available #5111
Conversation
did you look into #5110 first? :) |
@Ocramius of... course not. BLAH! I'll work with @TheFrozenFire to see which works better :) |
/** | ||
* @category Zend | ||
* @package Zend_Form | ||
* @subpackage UnitTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why you are wanting to do this? I followed the convention in the other tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#3508 only applies to library and explicitly says not to apply to tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This latest change takes sebastianbergmann/phpunit#997 into account — it's conditional on PHPUnit 3.8 (unreleased) and works with < PHPUnit 3.8 as well for now. Don't let it stop this going in. If @sebastianbergmann rejects the PR I'll patch these tests to remove it. |
|
||
use PHPUnit_Framework_TestCase as TestCase; | ||
use Zend\Form\Element\DateSelect; | ||
use Zend\Form\View\Helper\FormDateSelect as FormDateSelectHelper; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following framework practice please split this test file and add a new one for each helper
@dshafik ZF2 has a minimum requirement on PHPUnit 3.7 so why not use |
@Maks3w I believe it's because the data provider is still called. I don't remember why they didn't work, but I did try this and other options first. |
@dshafik You'll get a better success in your PHPUnit PR if you prevent trigger @dataProvider when @requires is false |
@Maks3w then it would still run in older versions and fatal error. This has to be something that is possible to work in current and newer versions of PHPUnit. Fixing the @dataProvider/@requires thing for > 3.7 doesn't help, this code would STILL need to be in the dataProvider (at least the intl check and return empty data set). |
Fix test suite when ext/intl isn't available
- EOF ending - Remove unnecessary annotations
Forward port #5111 Conflicts: tests/ZendTest/I18n/Translator/Loader/GettextTest.php tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
@weierophinney The referenced PHPUnit versions DON'T EXISTS! The patch proposed is not merged. |
…ext-intl-missing-failure Fix test suite when ext/intl isn't available
Forward port zendframework/zendframework#5111 Conflicts: tests/ZendTest/I18n/Translator/Loader/GettextTest.php tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
…ext-intl-missing-failure Fix test suite when ext/intl isn't available
Forward port zendframework/zendframework#5111 Conflicts: tests/ZendTest/I18n/Translator/Loader/GettextTest.php tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
…ext-intl-missing-failure Fix test suite when ext/intl isn't available
Forward port zendframework/zendframework#5111 Conflicts: tests/ZendTest/I18n/Translator/Loader/GettextTest.php tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
…ext-intl-missing-failure Fix test suite when ext/intl isn't available
Forward port zendframework/zendframework#5111 Conflicts: tests/ZendTest/I18n/Translator/Loader/GettextTest.php tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
…ext-intl-missing-failure Fix test suite when ext/intl isn't available
Forward port zendframework/zendframework#5111 Conflicts: tests/ZendTest/I18n/Translator/Loader/GettextTest.php tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
…ext-intl-missing-failure Fix test suite when ext/intl isn't available
Forward port zendframework/zendframework#5111 Conflicts: tests/ZendTest/I18n/Translator/Loader/GettextTest.php tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
…ext-intl-missing-failure Fix test suite when ext/intl isn't available
Forward port zendframework/zendframework#5111 Conflicts: tests/ZendTest/I18n/Translator/Loader/GettextTest.php tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
blog post)
Zend\I18n\Validator\Int
,switching some tests to use
Zend\Validation\Digits
might be a goodidea