Skip to content

Commit

Permalink
Expanded $inc test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcqualie committed Aug 9, 2013
1 parent 5597dc0 commit ac995ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/MongoMinify/Test/UpdateTest.php
Expand Up @@ -64,9 +64,13 @@ public function testUpdateInc()
'notifications.messages' => 10
)));

// Make sure value is updated normally
$document_lookup = $collection->findOne(array('email' => 'test@example.com'));
$this->assertEquals($document_lookup['notifications']['messages'], 11);

// Check Data stored in database is compressed
$document_native = $collection->findOne(array('email' => 'test@example.com'));
$this->assertEquals($document_native['notifications']['messages'], 11);
$document_native = $collection->native->findOne(array('e' => 'test@example.com'));
$this->assertEquals($document_native['n']['m'], 11);

}

Expand Down

0 comments on commit ac995ce

Please sign in to comment.