In order to run the tests you wrote, you need to execute the script
that Composer generated in vendor/bin
.
Remember always to run from the root directory of the project so
that PHPUnit can find your phpunit.xml
configuration file. Then, type ./vendor/bin/phpunit
.

When executing this program, we will get the feedback given by the tests. The output shows us that there is one test (one method) and one assertion and whether these were satisfactory. This output is what you would like to see every time you run your tests, but you will get more failed tests than you would like. Let's take a look at them by adding the following test:
public function testFail() { $customer = new Basic(1, 'han', 'solo', 'han@solo.com'); $this->assertSame( 4, $customer->getAmountToBorrow(), 'Basic customer should borrow up to 3 books.' ); }
This test will fail as we are checking whether getAmountToBorrow
returns 4, but you know that it
always returns 3. Let's run the tests and take a look at what kind
of output we get.

We can quickly note that the output is not good
due to the red color. It shows us that there is a failure, pointing
to the class and test method that failed. The feedback points out
the type of failure (as 3 is not identical to 4) and optionally,
the error message we added when invoking the assert
method.