Skip to content

Commit

Permalink
Replace tabs with spaces in test files
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Dec 12, 2017
1 parent b0a4735 commit ecaeb2c
Show file tree
Hide file tree
Showing 33 changed files with 403 additions and 403 deletions.
24 changes: 12 additions & 12 deletions tests/apm/monitoring-addSubscriber-001.phpt
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
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
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
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
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
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
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
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
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

0 comments on commit ecaeb2c

Please sign in to comment.