Re: com php-src: Add test for date_time_immutable invalid arguments: ext/date/tests/date_time_immutable001.phpt
| From: | Christoph M. Becker | Date: | Sat, 09 Feb 2019 16:37:25 +0000 |
| Subject: | Re: com php-src: Add test for date_time_immutable invalid arguments: ext/date/tests/date_time_immutable001.phpt | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-104505@lists.php.net to get a copy of this message | ||
On 09.02.2019 at 17:25, Peter Kokot wrote:
> On Sat, 9 Feb 2019 at 17:22, Christoph M. Becker <cmbecker69@gmx.de> wrote:
>>
>> On 09.02.2019 at 17:05, Peter Kokot wrote:
>>
>>> Commit: 1253a689260daca646d4f0de432a9da633db7dfd
>>> Author: Mark Niebergall <mbniebergall@gmail.com> Sat, 9 Feb 2019
>>> 17:05:22 +0100
>>> Committer: Peter Kokot <peterkokot@gmail.com> Sat, 9 Feb 2019 17:05:22 +0100
>>> Parents: 1227284fb5fdf31fa1ff654434a0bf50918f009c
>>> Branches: PHP-7.4 master
>>>
>>> Link:
>>> http://git.php.net/?p=php-src.git;a=commitdiff;h=1253a689260daca646d4f0de432a9da633db7dfd
>>>
>>> Log:
>>> Add test for date_time_immutable invalid arguments
>>>
>>> Changed paths:
>>> A ext/date/tests/date_time_immutable001.phpt
>>>
>>>
>>> Diff:
>>> diff --git a/ext/date/tests/date_time_immutable001.phpt
>>> b/ext/date/tests/date_time_immutable001.phpt
>>> new file mode 100644
>>> index 0000000..d6ac1d3
>>> --- /dev/null
>>> +++ b/ext/date/tests/date_time_immutable001.phpt
>>> @@ -0,0 +1,10 @@
>>> +--TEST--
>>> +DateTimeImmutable - invalid arguments
>>> +--CREDITS--
>>> +Mark Niebergall mbniebergall@gmail.com UPHPU TestFest 2017
>>> +--FILE--
>>> +<?php
>>> +var_dump(date_create_immutable('Invalid'));
>>> +?>
>>> +--EXPECTF--
>>> +bool(false)
>>
>> This looks like a ZPP test, and as such would be rather useless.
>
> See the discussion at:
> https://github.com/phpcommunity/phptestfest-php-src/pull/16
>
> It might seem so, but it seems this is testing for strange conventions
> in date according to the reviews... That's good or should we do
> something else here?
Ah, indeed, Joe is right, so the test is fine. Sorry for the noise!
--
Christoph M. Becker