/** * @test */ public function shouldFindModelByIdentificator() { $storage = new DoctrineStorage($this->dm, 'Payum\\Examples\\Document\\TestModel'); $model = $storage->createModel(); $storage->updateModel($model); $requestId = $model->getId(); $this->dm->clear(); $identificator = $storage->getIdentificator($model); $foundModel = $storage->findModelByIdentificator($identificator); $this->assertInstanceOf('Payum\\Examples\\Document\\TestModel', $foundModel); $this->assertEquals($requestId, $foundModel->getId()); }