Skip to content

Replace tabs with spaces in test files #702

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 1 commit into from
Dec 12, 2017
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
24 changes: 12 additions & 12 deletions tests/apm/monitoring-addSubscriber-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ $m = new MongoDB\Driver\Manager(STANDALONE);

class MySubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber
{
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "- started: ", $event->getCommandName(), "\n";
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "- started: ", $event->getCommandName(), "\n";
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
}

CLEANUP( STANDALONE );
Expand Down
30 changes: 15 additions & 15 deletions tests/apm/monitoring-addSubscriber-002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ $m = new MongoDB\Driver\Manager(STANDALONE);

class MySubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber
{
private $instanceName;
private $instanceName;

public function __construct( $instanceName )
{
$this->instanceName = $instanceName;
}
public function __construct( $instanceName )
{
$this->instanceName = $instanceName;
}

public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "- ({$this->instanceName}) - started: ", $event->getCommandName(), "\n";
}
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "- ({$this->instanceName}) - started: ", $event->getCommandName(), "\n";
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}
public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
}

CLEANUP( STANDALONE );
Expand Down
24 changes: 12 additions & 12 deletions tests/apm/monitoring-addSubscriber-003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ $m = new MongoDB\Driver\Manager(STANDALONE);

class MySubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber
{
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "- started: ", $event->getCommandName(), "\n";
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "- started: ", $event->getCommandName(), "\n";
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
}

$query = new MongoDB\Driver\Query( [] );
Expand Down
30 changes: 15 additions & 15 deletions tests/apm/monitoring-addSubscriber-004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ $m = new MongoDB\Driver\Manager(STANDALONE);

class MySubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber
{
private $instanceName;
private $instanceName;

public function __construct( $instanceName )
{
$this->instanceName = $instanceName;
}
public function __construct( $instanceName )
{
$this->instanceName = $instanceName;
}

public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "- ({$this->instanceName}) - started: ", $event->getCommandName(), "\n";
}
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "- ({$this->instanceName}) - started: ", $event->getCommandName(), "\n";
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}
public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
}

CLEANUP( STANDALONE );
Expand Down
42 changes: 21 additions & 21 deletions tests/apm/monitoring-commandFailed-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ $m = new MongoDB\Driver\Manager(STANDALONE);

class MySubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber
{
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "started: ", $event->getCommandName(), "\n";
}
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "started: ", $event->getCommandName(), "\n";
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}
public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
echo "failed: ", $event->getCommandName(), "\n";
echo "- getError() returns an object: ", is_object( $event->getError() ) ? 'yes' : 'no', "\n";
echo "- getError() returns an MongoDB\Driver\Exception\Exception object: ", $event->getError() instanceof MongoDB\Driver\Exception\Exception ? 'yes' : 'no', "\n";
echo "- getDurationMicros() returns an integer: ", is_integer( $event->getDurationMicros() ) ? 'yes' : 'no', "\n";
echo "- getDurationMicros() returns > 0: ", $event->getDurationMicros() > 0 ? 'yes' : 'no', "\n";
echo "- getCommandName() returns a string: ", is_string( $event->getCommandName() ) ? 'yes' : 'no', "\n";
echo "- getCommandName() returns '", $event->getCommandName(), "'\n";
echo "- getServer() returns an object: ", is_object( $event->getServer() ) ? 'yes' : 'no', "\n";
echo "- getServer() returns a Server object: ", $event->getServer() instanceof MongoDB\Driver\Server ? 'yes' : 'no', "\n";
echo "- getOperationId() returns a string: ", is_string( $event->getOperationId() ) ? 'yes' : 'no', "\n";
echo "- getRequestId() returns a string: ", is_string( $event->getRequestId() ) ? 'yes' : 'no', "\n";
}
public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
echo "failed: ", $event->getCommandName(), "\n";
echo "- getError() returns an object: ", is_object( $event->getError() ) ? 'yes' : 'no', "\n";
echo "- getError() returns an MongoDB\Driver\Exception\Exception object: ", $event->getError() instanceof MongoDB\Driver\Exception\Exception ? 'yes' : 'no', "\n";
echo "- getDurationMicros() returns an integer: ", is_integer( $event->getDurationMicros() ) ? 'yes' : 'no', "\n";
echo "- getDurationMicros() returns > 0: ", $event->getDurationMicros() > 0 ? 'yes' : 'no', "\n";
echo "- getCommandName() returns a string: ", is_string( $event->getCommandName() ) ? 'yes' : 'no', "\n";
echo "- getCommandName() returns '", $event->getCommandName(), "'\n";
echo "- getServer() returns an object: ", is_object( $event->getServer() ) ? 'yes' : 'no', "\n";
echo "- getServer() returns a Server object: ", $event->getServer() instanceof MongoDB\Driver\Server ? 'yes' : 'no', "\n";
echo "- getOperationId() returns a string: ", is_string( $event->getOperationId() ) ? 'yes' : 'no', "\n";
echo "- getRequestId() returns a string: ", is_string( $event->getRequestId() ) ? 'yes' : 'no', "\n";
}
}

$subscriber = new MySubscriber;
Expand Down
30 changes: 15 additions & 15 deletions tests/apm/monitoring-commandFailed-002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ $m = new MongoDB\Driver\Manager(STANDALONE);

class MySubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber
{
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "started: ", $event->getCommandName(), "\n";
$this->startRequestId = $event->getRequestId();
$this->startOperationId = $event->getOperationId();
}
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "started: ", $event->getCommandName(), "\n";
$this->startRequestId = $event->getRequestId();
$this->startOperationId = $event->getOperationId();
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}
public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
echo "failed: ", $event->getCommandName(), "\n";
echo "- requestId matches: ", $this->startRequestId == $event->getRequestId() ? 'yes' : 'no', " \n";
echo "- operationId matches: ", $this->startOperationId == $event->getOperationId() ? 'yes' : 'no', " \n";
}
public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
echo "failed: ", $event->getCommandName(), "\n";
echo "- requestId matches: ", $this->startRequestId == $event->getRequestId() ? 'yes' : 'no', " \n";
echo "- operationId matches: ", $this->startOperationId == $event->getOperationId() ? 'yes' : 'no', " \n";
}
}

$query = new MongoDB\Driver\Query( [] );
Expand Down
40 changes: 20 additions & 20 deletions tests/apm/monitoring-commandStarted-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ $m = new MongoDB\Driver\Manager(STANDALONE);

class MySubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber
{
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "started: ", $event->getCommandName(), "\n";
echo "- getCommand() returns an object: ", is_object( $event->getCommand() ) ? 'yes' : 'no', "\n";
echo "- getCommand() returns a stdClass object: ", $event->getCommand() instanceof stdClass ? 'yes' : 'no', "\n";
echo "- getDatabaseName() returns a string: ", is_string( $event->getDatabaseName() ) ? 'yes' : 'no', "\n";
echo "- getDatabaseName() returns '", $event->getDatabaseName(), "'\n";
echo "- getCommandName() returns a string: ", is_string( $event->getCommandName() ) ? 'yes' : 'no', "\n";
echo "- getCommandName() returns '", $event->getCommandName(), "'\n";
echo "- getServer() returns an object: ", is_object( $event->getServer() ) ? 'yes' : 'no', "\n";
echo "- getServer() returns a Server object: ", $event->getServer() instanceof MongoDB\Driver\Server ? 'yes' : 'no', "\n";
echo "- getOperationId() returns a string: ", is_string( $event->getOperationId() ) ? 'yes' : 'no', "\n";
echo "- getRequestId() returns a string: ", is_string( $event->getRequestId() ) ? 'yes' : 'no', "\n";
}
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "started: ", $event->getCommandName(), "\n";
echo "- getCommand() returns an object: ", is_object( $event->getCommand() ) ? 'yes' : 'no', "\n";
echo "- getCommand() returns a stdClass object: ", $event->getCommand() instanceof stdClass ? 'yes' : 'no', "\n";
echo "- getDatabaseName() returns a string: ", is_string( $event->getDatabaseName() ) ? 'yes' : 'no', "\n";
echo "- getDatabaseName() returns '", $event->getDatabaseName(), "'\n";
echo "- getCommandName() returns a string: ", is_string( $event->getCommandName() ) ? 'yes' : 'no', "\n";
echo "- getCommandName() returns '", $event->getCommandName(), "'\n";
echo "- getServer() returns an object: ", is_object( $event->getServer() ) ? 'yes' : 'no', "\n";
echo "- getServer() returns a Server object: ", $event->getServer() instanceof MongoDB\Driver\Server ? 'yes' : 'no', "\n";
echo "- getOperationId() returns a string: ", is_string( $event->getOperationId() ) ? 'yes' : 'no', "\n";
echo "- getRequestId() returns a string: ", is_string( $event->getRequestId() ) ? 'yes' : 'no', "\n";
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}
public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
}

$query = new MongoDB\Driver\Query( [] );
Expand Down
42 changes: 21 additions & 21 deletions tests/apm/monitoring-commandSucceeded-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ $m = new MongoDB\Driver\Manager(STANDALONE);

class MySubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber
{
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "started: ", $event->getCommandName(), "\n";
}
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "started: ", $event->getCommandName(), "\n";
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
echo "succeeded: ", $event->getCommandName(), "\n";
echo "- getReply() returns an object: ", is_object( $event->getReply() ) ? 'yes' : 'no', "\n";
echo "- getReply() returns a stdClass object: ", $event->getReply() instanceof stdClass ? 'yes' : 'no', "\n";
echo "- getDurationMicros() returns an integer: ", is_integer( $event->getDurationMicros() ) ? 'yes' : 'no', "\n";
echo "- getDurationMicros() returns > 0: ", $event->getDurationMicros() > 0 ? 'yes' : 'no', "\n";
echo "- getCommandName() returns a string: ", is_string( $event->getCommandName() ) ? 'yes' : 'no', "\n";
echo "- getCommandName() returns '", $event->getCommandName(), "'\n";
echo "- getServer() returns an object: ", is_object( $event->getServer() ) ? 'yes' : 'no', "\n";
echo "- getServer() returns a Server object: ", $event->getServer() instanceof MongoDB\Driver\Server ? 'yes' : 'no', "\n";
echo "- getOperationId() returns a string: ", is_string( $event->getOperationId() ) ? 'yes' : 'no', "\n";
echo "- getRequestId() returns a string: ", is_string( $event->getRequestId() ) ? 'yes' : 'no', "\n";
}
public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
echo "succeeded: ", $event->getCommandName(), "\n";
echo "- getReply() returns an object: ", is_object( $event->getReply() ) ? 'yes' : 'no', "\n";
echo "- getReply() returns a stdClass object: ", $event->getReply() instanceof stdClass ? 'yes' : 'no', "\n";
echo "- getDurationMicros() returns an integer: ", is_integer( $event->getDurationMicros() ) ? 'yes' : 'no', "\n";
echo "- getDurationMicros() returns > 0: ", $event->getDurationMicros() > 0 ? 'yes' : 'no', "\n";
echo "- getCommandName() returns a string: ", is_string( $event->getCommandName() ) ? 'yes' : 'no', "\n";
echo "- getCommandName() returns '", $event->getCommandName(), "'\n";
echo "- getServer() returns an object: ", is_object( $event->getServer() ) ? 'yes' : 'no', "\n";
echo "- getServer() returns a Server object: ", $event->getServer() instanceof MongoDB\Driver\Server ? 'yes' : 'no', "\n";
echo "- getOperationId() returns a string: ", is_string( $event->getOperationId() ) ? 'yes' : 'no', "\n";
echo "- getRequestId() returns a string: ", is_string( $event->getRequestId() ) ? 'yes' : 'no', "\n";
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
}

$query = new MongoDB\Driver\Query( [] );
Expand Down
30 changes: 15 additions & 15 deletions tests/apm/monitoring-commandSucceeded-002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ $m = new MongoDB\Driver\Manager(STANDALONE);

class MySubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber
{
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "started: ", $event->getCommandName(), "\n";
$this->startRequestId = $event->getRequestId();
$this->startOperationId = $event->getOperationId();
}
public function commandStarted( \MongoDB\Driver\Monitoring\CommandStartedEvent $event )
{
echo "started: ", $event->getCommandName(), "\n";
$this->startRequestId = $event->getRequestId();
$this->startOperationId = $event->getOperationId();
}

public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
echo "succeeded: ", $event->getCommandName(), "\n";
echo "- requestId matches: ", $this->startRequestId == $event->getRequestId() ? 'yes' : 'no', " \n";
echo "- operationId matches: ", $this->startOperationId == $event->getOperationId() ? 'yes' : 'no', " \n";
}
public function commandSucceeded( \MongoDB\Driver\Monitoring\CommandSucceededEvent $event )
{
echo "succeeded: ", $event->getCommandName(), "\n";
echo "- requestId matches: ", $this->startRequestId == $event->getRequestId() ? 'yes' : 'no', " \n";
echo "- operationId matches: ", $this->startOperationId == $event->getOperationId() ? 'yes' : 'no', " \n";
}

public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
public function commandFailed( \MongoDB\Driver\Monitoring\CommandFailedEvent $event )
{
}
}

$query = new MongoDB\Driver\Query( [] );
Expand Down
Loading