public function setUp()
 {
     parent::setUp();
     $this->bookEntityProvider = new BookEntityProvider();
     $this->hydratorMock = $this->getMockBuilder(DoctrineObject::class)->disableOriginalConstructor()->getMock();
     $this->classMetadataMock = $this->getMockBuilder(ClassMetadata::class)->setConstructorArgs([BookEntity::class])->setMethods(null)->getMock();
     $fieldNames = ['id' => array('columnName' => 'id', 'type' => Type::INTEGER), 'author' => array('columnName' => 'author', 'type' => Type::STRING), 'title' => array('columnName' => 'title', 'type' => Type::STRING), 'year' => array('columnName' => 'year', 'type' => Type::INTEGER), 'price' => array('columnName' => 'price', 'type' => Type::FLOAT), 'name' => array('columnName' => 'name', 'type' => Type::STRING), 'status' => array('columnName' => 'status', 'type' => Type::BOOLEAN)];
     $this->classMetadataMock->fieldMappings = $fieldNames;
     $this->entityManagerMock->expects($this->any())->method('getClassMetadata')->willReturn($this->classMetadataMock);
     $this->testedObj = new BooksRepository($this->entityManagerMock, $this->classMetadataMock);
     $this->testedObj->setHydrator($this->hydratorMock);
 }
 public function setUp()
 {
     parent::setUp();
     $this->classMetadataMock = $this->getMockBuilder(ClassMetadata::class)->setConstructorArgs([UserEntity::class])->setMethods(null)->getMock();
     $this->testedObject = new UsersRepository($this->entityManagerMock, $this->classMetadataMock);
 }