Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function testLibraryEntity(): void |
||
17 | { |
||
18 | $library = new Library(); |
||
19 | |||
20 | // Test values |
||
21 | $id = 1; |
||
22 | $title = "Hard-Boiled Wonderland and the End of the World"; |
||
23 | $author = "Haruki Murakami"; |
||
24 | $isbn = "9780099448785"; |
||
25 | $bookcover = "murakami.jpg"; |
||
26 | |||
27 | // Set values |
||
28 | $library->setId($id); |
||
29 | $library->setTitle($title); |
||
30 | $library->setAuthor($author); |
||
31 | $library->setIsbn($isbn); |
||
32 | $library->setBookcover($bookcover); |
||
33 | |||
34 | // Assert values |
||
35 | $this->assertEquals($id, $library->getId()); |
||
36 | $this->assertEquals($title, $library->getTitle()); |
||
37 | $this->assertEquals($author, $library->getAuthor()); |
||
38 | $this->assertEquals($isbn, $library->getIsbn()); |
||
39 | $this->assertEquals($bookcover, $library->getBookcover()); |
||
40 | } |
||
42 |