Commit 691e260c authored by Katherine Walker's avatar Katherine Walker

Remove use statement and testAppend

parent 78e4db1e
......@@ -2,7 +2,6 @@
namespace MongoDB\Tests\Model;
use MongoDB\Exception\BadMethodCallException;
use MongoDB\Model\TypeMapArrayIterator;
use MongoDB\Tests\TestCase;
......@@ -58,35 +57,6 @@ class TypeMapArrayIteratorTest extends TestCase
$this->assertEquals($expectedDocument, $iterator->offsetGet(0));
}
/**
* @expectedException MongoDB\Exception\BadMethodCallException
* @expectedExceptionMessage MongoDB\Model\TypeMapArrayIterator is immutable
*/
public function testAppendThrowsException()
{
$document = [
'array' => [1, 2, 3],
'object' => ['foo' => 'bar'],
];
$typeMap = [
'root' => 'object',
'document' => 'object',
'array' => 'array',
];
$iterator = new TypeMapArrayIterator([$document], $typeMap);
$expectedDocument = (object) [
'array' => [1, 2, 3],
'object' => (object) ['foo' => 'bar'],
];
$iterator->rewind();
$iterator->asort();
}
/**
* @dataProvider provideMutateMethods
* @expectedException MongoDB\Exception\BadMethodCallException
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment