From e38ac8ea6575f3eb47ec0dc91195c9daea36ce4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Wed, 4 Jun 2014 21:37:32 +0200 Subject: [PATCH] New tests. --- test/bookTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/bookTest.php b/test/bookTest.php index 5fb5a37..7427f0a 100644 --- a/test/bookTest.php +++ b/test/bookTest.php @@ -191,6 +191,13 @@ class BookTest extends PHPUnit_Framework_TestCase $this->assertEquals ("Strand Magazine", $book->getPublisher()->name); } + public function testGetBookById_NotFound () + { + $book = Book::getBookById(666); + + $this->assertNull ($book); + } + public function testGetRating_FiveStars () { $book = Book::getBookById(2);