Add this function in `testLikeRegistry.t.sol` file after making `test` file
Proof Of Code:
Test the `testUserFundWillLockedForInfiniteTime` function.
```javascript
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import {Test} from "forge-std/Test.sol";
import {LikeRegistry} from "../src/LikeRegistry.sol";
import {SoulboundProfileNFT} from "../src/SoulboundProfileNFT.sol";
contract testLikeRegistry is Test {
LikeRegistry likeRegistry;
SoulboundProfileNFT profileNFT;
address user1 = makeAddr("user1");
address user2 = makeAddr("user2");
address owner = makeAddr("owner");
function setUp() public {
vm.startPrank(owner);
profileNFT = new SoulboundProfileNFT();
likeRegistry = new LikeRegistry(address(profileNFT));
vm.stopPrank();
vm.deal(user1, 10 ether);
vm.deal(user2, 10 ether);
}
function testLikeUser() public {
vm.prank(user1);
profileNFT.mintProfile("Alice", 25, "ipfs://profileImage");
vm.prank(user2);
profileNFT.mintProfile("Bob", 25, "ipfs://profileImage");
vm.prank(user1);
likeRegistry.likeUser{value: 1 ether}(user2);
assertTrue(likeRegistry.likes(user1, user2), "User1 should like User2");
}
function testUserCanLikeBySendingMoreUnnesseseryETH() public {
vm.prank(user1);
profileNFT.mintProfile("Alice", 25, "ipfs://profileImage");
vm.prank(user2);
profileNFT.mintProfile("Bob", 25, "ipfs://profileImage");
vm.prank(user1);
likeRegistry.likeUser{value: 9 ether}(user2);
assertEq(address(likeRegistry).balance, 9 ether);
}
function testUserFundWillLockedForInfiniteTime() public {
vm.prank(user1);
profileNFT.mintProfile("Alice", 25, "ipfs://profileImage");
vm.prank(user2);
profileNFT.mintProfile("Bob", 25, "ipfs://profileImage");
vm.prank(user1);
likeRegistry.likeUser{value: 1 ether}(user2);
//There is no options or function to unlike user2.
}
function testUserFundsAreNotUpdated() public {
vm.prank(user1);
profileNFT.mintProfile("Alice", 25, "ipfs://profileImage");
vm.prank(user2);
profileNFT.mintProfile("Bob", 25, "ipfs://profileImage");
vm.prank(user1);
likeRegistry.likeUser{value: 1 ether}(user2);
assertEq(likeRegistry.userBalances(user1), 0, "User1 balance should be 0");
assertEq(likeRegistry.userBalances(user2), 0, "User2 balance should be 0");
assertEq(address(likeRegistry).balance, 1 ether);
}
}
```