Commit Graph

124 Commits

Author SHA1 Message Date
Jeremy Mikola fc8b862c09 PHPC-1113: Allow extra output for replica sets 2018-05-02 16:45:02 -04:00
Jeremy Mikola f79a626d86 Fix test titles 2018-05-02 16:39:53 -04:00
Jeremy Mikola 6cafb280f3 PHPC-1113: Use skip_if_not_standalone() for tests requiring a standalone 2018-05-02 16:39:00 -04:00
Jeremy Mikola 7ddb1fde9a PHPC-1113: Disable parse_url() tests (defer to PHPC-1177) 2018-05-02 16:04:09 -04:00
Jeremy Mikola 58fa85e85e PHPC-1113: Use common URI constant 2018-05-02 16:04:09 -04:00
Jeremy Mikola 9d4bc8da2c PHPC-1113: Replace NEEDS('REPLICASET_30') with skip functions 2018-05-02 16:04:08 -04:00
Jeremy Mikola 5f7f350670 PHPC-1113: Replace NEEDS('STANDALONE') with skip function 2018-05-02 16:04:08 -04:00
Jeremy Mikola b4062f880c PHPC-1113: Replace CLEANUP() with skip function 2018-05-02 16:04:08 -04:00
Jeremy Mikola 3a1362bb8d PHPC-1113: Replace NEEDS('REPLICASET') with skip function 2018-05-02 16:04:08 -04:00
Jeremy Mikola fe52b484be PHPC-1113: Replace NEEDS_ATLEAST_MONGODB_VERSION() with skip function 2018-05-02 16:04:07 -04:00
Jeremy Mikola 6960868ab7 PHPC-1113: Replace NEEDS_STORAGE_ENGINE() with skip function 2018-05-02 16:04:07 -04:00
Jeremy Mikola 480bc58cd3 Merge branch 'v1.4' 2018-04-18 16:08:00 -04:00
Jeremy Mikola 427854e092 PHPC-1152: Create implicit session for commands
This ensures that phongo_execute_command creates an implicit session (if supported and not explicit session was provided). In turn, this ensures that any command cursor shares the same session as its originating command.

By creating a Session object, we can ensure that the implicit session is destroyed during garbage collection when the last reference is removed.
2018-04-18 14:36:39 -04:00
Jeremy Mikola 3fad0c56c2 Merge branch 'v1.4' 2018-04-17 10:36:14 -04:00
Katherine Walker 0e8cf55649 PHPC-1159: Test on specific server versions in Travis CI 2018-04-17 09:35:51 -04:00
Jeremy Mikola 3af46fc79c Merge branch 'v1.4' 2018-04-16 11:32:51 -04:00
Jeremy Mikola cc90304658 PHPC-1151: Add Session to Cursor debug output 2018-04-16 11:28:21 -04:00
Jeremy Mikola 0b200dda09 PHPC-1133: Remove unused includes in SKIPIF and FILE sections 2018-02-27 09:48:25 -05:00
Derick Rethans d0d3cc7f96 Ensure these tests only run with wiredTiger engine 2018-01-12 11:55:41 +00:00
Derick Rethans 1e06f3428f Replace check for 'TRAVIS' with MongoDB server version check 2018-01-12 11:55:41 +00:00
Jeremy Mikola 0e737ebca1 Remove XFAIL tests depending on PHPC-1066 2018-01-03 12:58:10 -05:00
Jeremy Mikola a0d579c6e5 PHPC-1066: XFAIL tests for unknown options to execute methods
These tests were extracted from previous tests that combined invalid/unknown options.
2017-12-18 12:11:57 -05:00
Jeremy Mikola b29c423fda PHPC-1057: Refactor option parsing for execute methods
Execute options are now parsed via php_array functions, which makes the options case-sensitive.

A helper function is now used to convert legacy options for the original three execute methods into an array. This simplifies option parsing in php_phongo.c.

Additionally, Manager methods now perform their own server selection, which means that execute functions in php_phongo.c can rely on a server_id being provided.

Tests have been updated to expect a serverId option when relevant (e.g. query opts). Additionally, error tests for execute methods have been improved so that invalid values for all known options are tested.
2017-12-18 12:11:57 -05:00
Jeremy Mikola 140bf287d5 Fix titles in Server tests 2017-12-18 12:11:57 -05:00
Jeremy Mikola 03af904b5d PHPC-1071: Report class name for unexpected object values
This only updates exceptions where object types are entirely unexpected. For instance, options that expect a BSON document (i.e. array or object) need not use this macro, as any object would be accepted.
2017-12-15 11:23:44 -05:00
Jeremy Mikola f40db84527 Fix expected output for Server::executeCommand() test 2017-12-12 15:55:12 -05:00
Jeremy Mikola 154ca9317b Test MONGOC_CMD_RAW options for Server::executeCommand()
This test is adapted from manager-executeCommand-004.phpt.
2017-12-12 15:11:46 -05:00
Jeremy Mikola 70500074dd Note MONGOC_CMD_RAW in executeCommand() option tests
This serves as a reminder that executeCommand() is the execution method for raw commands.
2017-12-12 15:11:46 -05:00
Jeremy Mikola ecaeb2c1a2 Replace tabs with spaces in test files 2017-12-12 08:17:59 -05:00
Derick Rethans 4c5f9a6e46 PHPC-934: Fixed tests for MongoDB 3.6 2017-12-08 12:23:12 +00:00
Derick Rethans d36784d1ee Skip some tests on Travis, as it doesn't run 3.6 yet 2017-11-29 16:33:06 +00:00
Derick Rethans b2e90bbc65 Add test cases 2017-11-29 13:07:13 +00:00
Derick Rethans 87fbd007f0 PHPC-1042: Support options array for BulkWrite, Command, and Query execute methods 2017-11-27 16:21:58 +00:00
Derick Rethans 5a00dcead0 PHPC-1036: Update test suite for MongoDB 3.6 2017-11-13 18:09:21 +00:00
Jeremy Mikola 925963199d PHPC-692: Check for phongo_bson_to_zval_ex() failures in Server methods 2017-05-08 12:22:20 -04:00
Jeremy Mikola ee613c214c PHPC-628: Throw InvalidArgumentException when executing empty BulkWrite 2017-05-08 12:21:03 -04:00
Jeremy Mikola d5f41f659d PHPC-411: Drop system.profile collection before tests 2017-03-15 10:44:45 -04:00
Jeremy Mikola e6b8479506 Reorganize SKIPIF blocks in tests and add missing NEEDS() checks 2017-03-15 10:41:04 -04:00
Jeremy Mikola 2599607b47 PHPC-635: WriteResult debug handler should return objects 2016-12-19 09:40:29 -05:00
Jeremy Mikola 97a26a18e7 Remove unnecessary SKIPIFs from extends tests 2016-09-21 16:32:39 -04:00
Jeremy Mikola f37f589bbc PHPC-783: Use mongoc_collection_find_with_opts() for Query exec
Query struct fields have been consolidated to a filter and opts BSON documents.

This also changes the Query debug output significantly.
2016-09-20 16:57:20 -04:00
Derick Rethans 8f9e6c8c53 PHPC-498: ReadPreference, ReadConcern, and WriteConcern should serialize to BSON 2016-09-19 20:33:14 +01:00
Derick Rethans 39044213f3 Fixed tests, as MongoDB 3.3 adds an extra item 2016-08-31 18:11:53 +01:00
Jeremy Mikola a327a22cb8 Merge branch 'v1.1' 2016-06-02 11:20:03 -04:00
Jeremy Mikola 05fcc2ea4f PHPC-671: Avoid mongoc_client_t use-after-free by Cursor and Server 2016-05-31 15:10:53 -04:00
Jeremy Mikola c0046a3e63 PHPC-673: Fix Cursor::isDead() tests for mongoc_cursor_is_alive()
This changes our tests based on upstream fixes for mongoc_cursor_is_alive() in CDRIVER-1221.
2016-05-17 16:12:13 -04:00
Jeremy Mikola 78839bde83 PHPC-688: Change Cursor debug handler to use libmongoc public API
This significantly alters the structure of the Cursor's debug output, since we not longer have access to private fields within mongoc_cursor_t.
2016-05-06 11:48:31 -04:00
Jeremy Mikola db0e3031f4 PHPC-693: Unacknowledged write result reports null counts
In CDRIVER-1194, the reply BSON was changed to be empty for unacknowledged writes.
2016-05-03 13:03:51 -04:00
Jeremy Mikola e2209d50b8 PHPC-689: Use mongoc_cursor_set_hint() for query/command execution
Test changes were necessary because mongoc_cursor_set_hint() forces the slaveOk flag (CDRIVER-903).
2016-04-29 14:32:09 -04:00
Jeremy Mikola f15f20ad0b Server::executeCommand() takes a database name, not a namespace 2016-04-29 14:32:01 -04:00