Browse Source

New tests.

master
Sébastien Lucas 10 years ago
parent
commit
e38ac8ea65
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      test/bookTest.php

+ 7
- 0
test/bookTest.php View File

@@ -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);


Loading…
Cancel
Save