Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fix test suite when ext/intl isn't available #5111

Closed

Conversation

dshafik
Copy link
Contributor

@dshafik dshafik commented Sep 14, 2013

  • This will hopefully enable the testsuite to run in HHVM (see: this
    blog post
    )
  • There were a bunch of errors caused by Zend\I18n\Validator\Int,
    switching some tests to use Zend\Validation\Digits might be a good
    idea

@Ocramius
Copy link
Member

did you look into #5110 first? :)

@dshafik
Copy link
Contributor Author

dshafik commented Sep 14, 2013

@Ocramius of... course not. BLAH!

I'll work with @TheFrozenFire to see which works better :)

/**
* @category Zend
* @package Zend_Form
* @subpackage UnitTest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove @category @Package and @subpackage

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please take a look #3508 , it's old issue that we agree to remove all @category @Package and @subpackage. I only comment to remove new created one/all of them.

@dshafik
Copy link
Contributor Author

dshafik commented Sep 15, 2013

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;
Copy link
Member

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

@Maks3w
Copy link
Member

Maks3w commented Oct 21, 2013

@dshafik ZF2 has a minimum requirement on PHPUnit 3.7 so why not use @requires annotation?

http://phpunit.de/manual/3.7/en/incomplete-and-skipped-tests.html#incomplete-and-skipped-tests.requires.tables.api

@dshafik
Copy link
Contributor Author

dshafik commented Oct 21, 2013

@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.

@Maks3w
Copy link
Member

Maks3w commented Oct 21, 2013

@dshafik You'll get a better success in your PHPUnit PR if you prevent trigger @dataProvider when @requires is false

@dshafik
Copy link
Contributor Author

dshafik commented Oct 21, 2013

@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).

weierophinney added a commit that referenced this pull request Oct 22, 2013
Fix test suite when ext/intl isn't available
weierophinney added a commit that referenced this pull request Oct 22, 2013
- EOF ending
- Remove unnecessary annotations
weierophinney added a commit that referenced this pull request Oct 22, 2013
Forward port #5111

Conflicts:
	tests/ZendTest/I18n/Translator/Loader/GettextTest.php
	tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
@ghost ghost assigned weierophinney Oct 22, 2013
@Maks3w
Copy link
Member

Maks3w commented Oct 22, 2013

@weierophinney The referenced PHPUnit versions DON'T EXISTS! The patch proposed is not merged.

@weierophinney
Copy link
Member

@Maks3w If Sebastian chooses not to merge it, @dshafik has indicated he'll issue a revert. Indications at this point are that it will be merged, however.

weierophinney added a commit to zendframework/zend-config that referenced this pull request May 15, 2015
…ext-intl-missing-failure

Fix test suite when ext/intl isn't available
weierophinney added a commit to zendframework/zend-config that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-config that referenced this pull request May 15, 2015
Forward port zendframework/zendframework#5111

Conflicts:
	tests/ZendTest/I18n/Translator/Loader/GettextTest.php
	tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
…ext-intl-missing-failure

Fix test suite when ext/intl isn't available
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
Forward port zendframework/zendframework#5111

Conflicts:
	tests/ZendTest/I18n/Translator/Loader/GettextTest.php
	tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
weierophinney added a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
…ext-intl-missing-failure

Fix test suite when ext/intl isn't available
weierophinney added a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
Forward port zendframework/zendframework#5111

Conflicts:
	tests/ZendTest/I18n/Translator/Loader/GettextTest.php
	tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
weierophinney added a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
…ext-intl-missing-failure

Fix test suite when ext/intl isn't available
weierophinney added a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
Forward port zendframework/zendframework#5111

Conflicts:
	tests/ZendTest/I18n/Translator/Loader/GettextTest.php
	tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
…ext-intl-missing-failure

Fix test suite when ext/intl isn't available
weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
Forward port zendframework/zendframework#5111

Conflicts:
	tests/ZendTest/I18n/Translator/Loader/GettextTest.php
	tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
weierophinney added a commit to zendframework/zend-log that referenced this pull request May 15, 2015
…ext-intl-missing-failure

Fix test suite when ext/intl isn't available
weierophinney added a commit to zendframework/zend-log that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-log that referenced this pull request May 15, 2015
Forward port zendframework/zendframework#5111

Conflicts:
	tests/ZendTest/I18n/Translator/Loader/GettextTest.php
	tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
…ext-intl-missing-failure

Fix test suite when ext/intl isn't available
weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
Forward port zendframework/zendframework#5111

Conflicts:
	tests/ZendTest/I18n/Translator/Loader/GettextTest.php
	tests/ZendTest/I18n/Translator/Loader/PhpArrayTest.php
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants