Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
3b74cd5e
Commit
3b74cd5e
authored
Jan 30, 2018
by
Jeremy Mikola
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #459
parents
f4801b80
b8a481ee
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
DatabaseFunctionalTest.php
tests/Database/DatabaseFunctionalTest.php
+2
-2
IndexInfoTest.php
tests/Model/IndexInfoTest.php
+2
-2
ChangeStreamFunctionalTest.php
tests/Operation/ChangeStreamFunctionalTest.php
+4
-4
No files found.
tests/Database/DatabaseFunctionalTest.php
View file @
3b74cd5e
...
...
@@ -91,7 +91,7 @@ class DatabaseFunctionalTest extends FunctionalTestCase
$commandResult
=
current
(
$cursor
->
toArray
());
$this
->
assertCommandSucceeded
(
$commandResult
);
$this
->
assert
True
(
isset
(
$commandResult
->
ismaster
)
);
$this
->
assert
ObjectHasAttribute
(
'ismaster'
,
$commandResult
);
$this
->
assertTrue
(
$commandResult
->
ismaster
);
}
...
...
@@ -110,7 +110,7 @@ class DatabaseFunctionalTest extends FunctionalTestCase
$this
->
assertCommandSucceeded
(
$commandResult
);
$this
->
assertInternalType
(
'array'
,
$commandResult
);
$this
->
assert
True
(
isset
(
$commandResult
[
'ismaster'
])
);
$this
->
assert
ArrayHasKey
(
'ismaster'
,
$commandResult
);
$this
->
assertTrue
(
$commandResult
[
'ismaster'
]);
}
...
...
tests/Model/IndexInfoTest.php
View file @
3b74cd5e
...
...
@@ -80,7 +80,7 @@ class IndexInfoTest extends TestCase
$this
->
assertFalse
(
$info
->
isSparse
());
$this
->
assertTrue
(
$info
->
isTtl
());
$this
->
assertFalse
(
$info
->
isUnique
());
$this
->
assert
True
(
isset
(
$info
[
'expireAfterSeconds'
])
);
$this
->
assert
ArrayHasKey
(
'expireAfterSeconds'
,
$info
);
$this
->
assertSame
(
100
,
$info
[
'expireAfterSeconds'
]);
}
...
...
@@ -107,7 +107,7 @@ class IndexInfoTest extends TestCase
]);
$this
->
assertInstanceOf
(
'ArrayAccess'
,
$info
);
$this
->
assert
True
(
isset
(
$info
[
'name'
])
);
$this
->
assert
ArrayHasKey
(
'name'
,
$info
);
$this
->
assertSame
(
'x_1'
,
$info
[
'name'
]);
}
...
...
tests/Operation/ChangeStreamFunctionalTest.php
View file @
3b74cd5e
...
...
@@ -143,7 +143,7 @@ class ChangeStreamFunctionalTest extends FunctionalTestCase
$changeStreamResult
=
$this
->
collection
->
watch
();
$this
->
assert
Same
(
null
,
$changeStreamResult
->
key
());
$this
->
assert
Null
(
$changeStreamResult
->
key
());
$result
=
$this
->
collection
->
insertOne
([
'x'
=>
1
]);
$this
->
assertInstanceOf
(
'MongoDB\InsertOneResult'
,
$result
);
...
...
@@ -153,15 +153,15 @@ class ChangeStreamFunctionalTest extends FunctionalTestCase
$this
->
assertSame
(
1
,
$changeStreamResult
->
key
());
$changeStreamResult
->
next
();
$this
->
assert
Same
(
null
,
$changeStreamResult
->
key
());
$this
->
assert
Null
(
$changeStreamResult
->
key
());
$changeStreamResult
->
next
();
$this
->
assert
Same
(
null
,
$changeStreamResult
->
key
());
$this
->
assert
Null
(
$changeStreamResult
->
key
());
$operation
=
new
DatabaseCommand
(
$this
->
getDatabaseName
(),
[
"killCursors"
=>
$this
->
getCollectionName
(),
"cursors"
=>
[
$changeStreamResult
->
getCursorId
()]]);
$operation
->
execute
(
$this
->
getPrimaryServer
());
$changeStreamResult
->
next
();
$this
->
assert
Same
(
null
,
$changeStreamResult
->
key
());
$this
->
assert
Null
(
$changeStreamResult
->
key
());
$result
=
$this
->
collection
->
insertOne
([
'x'
=>
2
]);
$this
->
assertInstanceOf
(
'MongoDB\InsertOneResult'
,
$result
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment