public function setUp()
 {
     $mongoCollectionMock = $this->getMockBuilder('\\MongoCollection')->disableOriginalConstructor()->setMethods(['save', 'find', 'remove'])->getMock();
     $this->mongoCollectionMock = $mongoCollectionMock;
     $mockProxy = new MongoCollectionMockProxy();
     $mockProxy->__MongoCollectionMockProxy__setMock($this->mongoCollectionMock);
     $rs = new ArrayObjectResultSet();
     $model = new Model($mockProxy, $rs);
     $hyd = new ObjectProperty();
     $model->setHydrator($hyd);
     $this->model = $model;
 }
 public function setUp()
 {
     $mongoCollectionMock = $this->getMockBuilder('\\MongoCollection')->disableOriginalConstructor()->setMethods(['save', 'find', 'remove', 'insert', 'update', 'getName'])->getMock();
     $this->mongoCollectionMock = $mongoCollectionMock;
     self::disableStrictErrors();
     $mockProxy = new MongoCollectionMockProxy();
     self::restoreErrorReportingLevel();
     $mockProxy->__MongoCollectionMockProxy__setMock($mongoCollectionMock);
     $this->mockProxy = $mockProxy;
     $hydrator = new TransactionModelHydrator();
     $resultSetPrototype = new HydratingResultSet();
     $resultSetPrototype->setObjectPrototype($this->createTransactionEntityAsset());
     $resultSetPrototype->setHydrator($hydrator);
     $this->transactionModel = new TransactionModel($mockProxy, $resultSetPrototype);
     $this->transactionModel->setHydrator($hydrator);
     $reflClass = new \ReflectionClass($this->transactionModel);
     $this->classRefl = $reflClass;
     $this->switchStateMethodRefl = $reflClass->getMethod('switchState');
     $this->switchStateMethodRefl->setAccessible(true);
 }