Skip to content

PHPLIB-652: Convert change streams to unified test format #908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
301 changes: 0 additions & 301 deletions tests/SpecTests/ChangeStreamsSpecTest.php

This file was deleted.

14 changes: 0 additions & 14 deletions tests/SpecTests/CommandExpectations.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,6 @@ private function __construct(array $events)
}
}

public static function fromChangeStreams(array $expectedEvents)
{
$o = new self($expectedEvents);

$o->ignoreCommandFailed = true;
$o->ignoreCommandSucceeded = true;
/* Change Streams spec tests do not include getMore commands in the
* list of expected events, so ignore any observed events beyond the
* number that are expected. */
$o->ignoreExtraEvents = true;

return $o;
}

public static function fromClientSideEncryption(array $expectedEvents)
{
$o = new self($expectedEvents);
Expand Down
21 changes: 0 additions & 21 deletions tests/SpecTests/ErrorExpectation.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,6 @@ private function __construct()
{
}

public static function fromChangeStreams(stdClass $result)
{
$o = new self();

if (isset($result->error->code)) {
$o->code = $result->error->code;
$o->isExpected = true;
}

if (isset($result->error->errorLabels)) {
if (! self::isArrayOfStrings($result->error->errorLabels)) {
throw InvalidArgumentException::invalidType('errorLabels', $result->error->errorLabels, 'string[]');
}

$o->includedLabels = $result->error->errorLabels;
$o->isExpected = true;
}

return $o;
}

public static function fromClientSideEncryption(stdClass $operation)
{
return self::fromGenericOperation($operation);
Expand Down
Loading