summaryrefslogtreecommitdiff
path: root/ext/standard/tests
Commit message (Collapse)AuthorAgeFilesLines
* Make constant() error handling consistent with plain const lookupNikita Popov2020-01-101-4/+8
| | | | | | This means we get an Error exception and a much better error message indicating the root cause (e.g. accessing a private class constant).
* Merge branch 'PHP-7.4'Christoph M. Becker2020-01-091-1/+1
|\ | | | | | | | | * PHP-7.4: Silence potential taskkill error messages
| * Silence potential taskkill error messagesChristoph M. Becker2020-01-091-1/+1
| | | | | | | | | | That test is still intermittently failing, because failure to kill the child process is reported. Therefore we silence these error messages.
* | Fix testChristoph M. Becker2020-01-091-1/+1
| | | | | | | | | | The typo in the echoed string had been fixed in master; fix the expectation as well.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-092-21/+329
|\ \ | |/ | | | | | | * PHP-7.4: Fix useless tests
| * Fix useless testsChristoph M. Becker2020-01-092-21/+329
| | | | | | | | | | | | These tests are certainly not supposed to fail due to a typo in the class names, but expect this failure. We fix the typos and the expectations.
* | Allows further tests to run on WindowsChristoph M. Becker2020-01-097-44/+14
| |
* | Unify mail related tests for *nix and WindowsChristoph M. Becker2020-01-091-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently mail related tests are split for *nix and Windows (if there are even Windows versions). The basic difference is that the *nix variants set the INI directive sendmail_path to just write the email to disk, while the Windows tests use ext/imap. The latter tests are way more verbose, and such duplicated tests are generally a pain point. Furthermore, the Windows tests are much slower, and could not be run without ext/imap being available. We therefore introduce a small fakemail application, which basically works like `tee <path> >/dev/null`, and which will be shipped with the Windows tests packs. fakemail.exe would also need to be added to the PHP binary SDK, so these tests could be run during developments. To cater to the remaining differences, we also introduce support for `{MAIL:<path>}` placeholders in the INI sections to run-tests.php. How to use this can be seen in mail_basic.phpt, which is currently the only modified test case, because these tests are yet supposed to fail on Windows, due to the missing fakemail.exe in the PHP SDK.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-071-1/+1
|\ \ | |/ | | | | | | * PHP-7.4: Increase sleep() time in test case
| * Increase sleep() time in test caseChristoph M. Becker2020-01-071-1/+1
| | | | | | | | | | Apparently, the former increase to `sleep(2)` helped somewhat, but still the test fails occassionally.
* | Merge branch 'PHP-7.4'Nikita Popov2020-01-061-0/+60
|\ \ | |/ | | | | | | * PHP-7.4: Throw Error when referencing uninit typed prop in __sleep
| * Throw Error when referencing uninit typed prop in __sleepNikita Popov2020-01-061-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously this generated a notice, but would likely generate an Error when unserializing. Now we treat it with the same distinction as direct property accesses, i.e. referencing an unset/undefined normal property stays a notice, while a typed property becomes an Error exception. This fixed bug #79002. Closes GH-5050.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-061-0/+24
|\ \ | |/ | | | | | | * PHP-7.4: Fix #54298: Using empty additional_headers adding extraneous CRLF
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-01-061-0/+24
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #54298: Using empty additional_headers adding extraneous CRLF
| | * Fix #54298: Using empty additional_headers adding extraneous CRLFChristoph M. Becker2020-01-061-0/+24
| | | | | | | | | | | | | | | If the header string is empty, we pass `NULL` to `php_mail()` to avoid further checks on the string length.
* | | Remove duplicate test casesChristoph M. Becker2020-01-052-67/+0
| | | | | | | | | | | | | | | | | | | | | These had originally used other exit codes as mail_basic5.phpt, but that was changed later with commit d1b12c9[1]. [1] <http://git.php.net/?p=php-src.git;a=commit;h=d1b12c9a3031841302722d6f6706e4598a639d7a>
* | | Fix slowest testsGabriel Caruso2020-01-0521-37/+59
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-031-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Slightly increase tolerance in time_sleep_until() test
| * | Slightly increase tolerance in time_sleep_until() testNikita Popov2020-01-031-1/+1
| | | | | | | | | | | | | | | With the 1ms tolerance this still occasionally fails on macos. I love macos. It always works and causes no problems at all.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-031-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Try to fix intermittently failing test case
| * | Try to fix intermittently failing test caseChristoph M. Becker2020-01-031-1/+1
| | | | | | | | | | | | | | | | | | This test fails intermittently due to taskill reporting failure to kill the process (because it already has been terminated). We increase the sleep time, to hopefully prevent that from happening again.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-021-0/+34
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Add test case for bug #78883
| * | Add test case for bug #78883Christoph M. Becker2020-01-021-0/+34
| | | | | | | | | | | | The original test has been provided by divinity76.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-022-0/+34
|\ \ \ | |/ / | | | | | | | | | | | | | | | * PHP-7.4: Populate hashtable of __sleep() properties Deref names returned by __sleep() Extract php_var_serialize_nested_data() function
| * | Populate hashtable of __sleep() propertiesNikita Popov2020-01-021-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of populating a hashtable of property names and then directly serializing. This has the advantage of a) detecting duplicate properties more precisely and b) gives us the ability to discard values without rewriting the serialization string after the fact for GH-5027.
| * | Deref names returned by __sleep()Nikita Popov2020-01-021-0/+18
| | |
* | | Always delete tempfile created by ftruncate test.Tyson Andre2020-01-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ftruncate() test will fill up the disk when the disk has less than 2GB of space left, on some systems. I think it expands the file to less than 2GB, then returns an error code, and the file remains at the larger size. Because the disk is full, the `--CLEAN--` script can't be saved to `ftruncate_bug76422.clean.php` to be executed, and the cleanup can't be run. Subsequent tests also fail to run. Closes GH-5043
* | | Merge branch 'PHP-7.4'Christoph M. Becker2019-12-311-33/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: [ci skip] Revert "Add test case for bug #78883"
| * | [ci skip] Revert "Add test case for bug #78883"Christoph M. Becker2019-12-311-33/+0
| | | | | | | | | | | | | | | This reverts commit 09e76cbe6d73399f3476942e7502de0bdbf65fa2, because the test fails reliably on AppVeyor. This needs closer investigation.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2019-12-311-0/+33
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Add test case for bug #78883
| * | Add test case for bug #78883Christoph M. Becker2019-12-311-0/+33
| | | | | | | | | | | | The actual test has been provided by divinity76.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-301-2/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Properly propagate url_stat exceptions during include
| * | Properly propagate url_stat exceptions during includeNikita Popov2019-12-301-2/+0
| | | | | | | | | | | | | | | Make sure we abort operations early, and that we don't emit additional warnings or errors if an exception has been thrown.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-301-5/+6
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.4: Add test for bug #79031 Revert "Increase serialize_lock while decoding session"
| * | Revert "Increase serialize_lock while decoding session"Nikita Popov2019-12-301-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b8ef7c35abd31666d9fb317db4b09a9eef0ede6c. See bug #79031. The semantics of serialize locking aren't quite correct right now, and the use of the lock in this particular place makes us hit the issue in a common case. I'm reverting this commit for PHP 7.4 and will try to fix this properly for PHP 8, as I believe it will require ABI breakage.
* | | Implemented FR #78638 (__PHP_Incomplete_Class should be final)Xinchen Hui2019-12-241-0/+9
| | | | | | | | | | | | This should be minor and won't impact anyone
* | | Fix #78880: Spelling error reportChristoph M. Becker2019-12-21113-661/+661
| | | | | | | | | | | | | | | | | | | | | We fix the most often occuring typos according to a recent codespell report[1] in tests, code comments and documentation. [1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html>.
* | | Promote warning to exception for proc_open() when null byte is encounteredMáté Kocsis2019-12-201-9/+15
| | | | | | | | | | | | GH-5004
* | | Promote warnings to exceptions in string search related functionsMáté Kocsis2019-12-2011-174/+209
| | | | | | | | | | | | GH-5004
* | | Promote warnings to exceptions in proc_open() functionMáté Kocsis2019-12-203-17/+33
| | | | | | | | | | | | GH-5004
* | | Promote warrnings to exceptions in chgrp() functionMáté Kocsis2019-12-201-4/+6
| | | | | | | | | | | | GH-5004
* | | Promote warning to exception in dns_check_record() functionMáté Kocsis2019-12-201-4/+7
| | | | | | | | | | | | GH-5004
* | | Fix merge mistakeNikita Popov2019-12-201-1/+0
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-201-14/+10
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Try to make proc_open_bug69900.phpt more robust
| * | Try to make proc_open_bug69900.phpt more robustNikita Popov2019-12-201-14/+9
| | |
* | | Promote warnings to exceptions in stream-related functionsMáté Kocsis2019-12-205-41/+47
| | | | | | | | | | | | GH-5017
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-201-0/+19
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fixed bug #79000
| * | Fixed bug #79000Nikita Popov2019-12-201-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | Don't report EAGAIN/EWOULDBLOCK as errors for fwrite on non-blocking socket streams. This matches behavior for fread, as well as behavior for plain file streams. Closes GH-5026.
* | | Convert string|array union parameter typesMáté Kocsis2019-12-202-30/+28
| | | | | | | | | | | | Closes GH-4995
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-191-0/+10
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Add destructor annotations in ini parser