removed output buffer(ob_start/ob_end_clean) usasge in MongoDbCommand profile output

This commit is contained in:
Anton Grebnev
2012-05-23 18:59:20 +04:00
parent df491fdbbd
commit c0fa542b3c
2 changed files with 23 additions and 37 deletions

View File

@ -334,6 +334,7 @@ class MongoDbCommandTest extends PHPUnit_Framework_TestCase
$cmd = MongoCommandBuilder::factory(MongoCommandBuilder::FIND, new CollectionMock());
$cmd->bindParam('condition', array());
$this->assertStringStartsWith("\n" . 'Collection: CollectionMock', $cmd->__toString());
$this->assertContains('Condition: ' . '[]' . PHP_EOL, $cmd->__toString());
$cmd = MongoCommandBuilder::factory(MongoCommandBuilder::COMMAND, new CollectionMock());
$this->assertSame('Command properties not set', $cmd->__toString());
@ -347,6 +348,7 @@ class MongoDbCommandTest extends PHPUnit_Framework_TestCase
->bindParam('safe', true);
$this->assertStringStartsWith("\n" . 'Collection: ', $cmd->__toString());
$this->assertContains('Bulk insert: FALSE', $cmd->__toString());
$this->assertContains('Data: ' . '[' . PHP_EOL . "\tname = insert" . PHP_EOL . ']' . PHP_EOL, $cmd->__toString());
$cmd = MongoCommandBuilder::factory(MongoCommandBuilder::INSERT, $this->collection);
$this->assertSame('Command properties not set', $cmd->__toString());