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

Realtext provider #434

Merged
merged 5 commits into from
Oct 29, 2014
Merged

Realtext provider #434

merged 5 commits into from
Oct 29, 2014

Conversation

tzhuan
Copy link
Contributor

@tzhuan tzhuan commented Oct 7, 2014

This PR generalizes the base realText provider and provides the instance for zh_TW locale.

@tzhuan
Copy link
Contributor Author

tzhuan commented Oct 7, 2014

The travis test failed in HHVM only and the error message is:

  1. Faker\Test\Provider\DateTimeTest::testFixedSeedWithMaximumTimestamp
    Failed asserting that two DateTime objects are equal.
    --- Expected
    +++ Actual
    @@ @@
    -2015-07-06T14:25:05+0000
    +2015-07-06T14:25:06+0000

/home/travis/build/fzaninotto/Faker/test/Faker/Provider/DateTimeTest.php:119

FAILURES!
Tests: 593, Assertions: 1314, Failures: 1.
make: *** [test] Error 1

Since the DateTime provider is not touched in this PR, I am not sure where the issue is. Could you please give me some advise for that? Thanks.

@TimWolla
Copy link
Contributor

TimWolla commented Oct 7, 2014

Probably a random failure due to an advancing clock...


protected static function strlen($text)
{
return function_exists('mb_strlen') ? mb_strlen($text, 'UTF-8') : count(static::split($text));
Copy link
Owner

Choose a reason for hiding this comment

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

static::split() doesn't seem to exist. Do you mean static::explode()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, you are right. Fixed now.

@fzaninotto
Copy link
Owner

I re-triggered Travis, and it seems to pass now.

fzaninotto added a commit that referenced this pull request Oct 29, 2014
@fzaninotto fzaninotto merged commit d56c58f into fzaninotto:master Oct 29, 2014
@fzaninotto
Copy link
Owner

Thanks a lot!

@tzhuan
Copy link
Contributor Author

tzhuan commented Oct 29, 2014

Thanks! :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants