use php to write an api collection that simulates the basic operation of a bank account:
- create an account
- close your account
- get the current balance
- withdraw
- Deposit
- transfer (account transfer limit is $10000 per day)
a. Transfer money to the same user, another account
No service charge
b. An account transferred to another user
must use the following api interface to obtain the transfer authorization:
http://handy.travel/test/succ.
to simplify the operation, you do not need to pass any parameters to the API
if the transfer is authorized, return {" status ":" success "}
each transfer. There is a fixed service charge of $100,000,000
for testing convenience, no authorization is required to access these interfaces.
if provided to a variety of test methods, it will add extra points to your written test.
in your code, you need to focus on reusability, readability and extensibility, and provide enough comments to use any third-party class library.
We need to start with three key points: database design, MVC architecture and unit testing