From 88ff8f540967909b5aae36a39d6011f73d2b77de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Tue, 29 Apr 2014 16:18:18 +0200 Subject: [PATCH] Again more test functions. --- test/bookTest.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/bookTest.php b/test/bookTest.php index b19d7dc..77dceb5 100644 --- a/test/bookTest.php +++ b/test/bookTest.php @@ -266,15 +266,30 @@ class BookTest extends PHPUnit_Framework_TestCase ); } - public function testGetMostInterestingDataToSendToKindle () + public function testGetMostInterestingDataToSendToKindle_WithMOBI () { // Get Alice (available as MOBI, PDF, EPUB in that order) $book = Book::getBookById(17); $data = $book->GetMostInterestingDataToSendToKindle (); $this->assertEquals ("MOBI", $data->format); + } + + public function testGetMostInterestingDataToSendToKindle_WithPdf () + { + // Get Alice (available as MOBI, PDF, EPUB in that order) + $book = Book::getBookById(17); + $data = $book->GetMostInterestingDataToSendToKindle (); array_shift ($book->datas); $data = $book->GetMostInterestingDataToSendToKindle (); $this->assertEquals ("PDF", $data->format); + } + + public function testGetMostInterestingDataToSendToKindle_WithEPUB () + { + // Get Alice (available as MOBI, PDF, EPUB in that order) + $book = Book::getBookById(17); + $data = $book->GetMostInterestingDataToSendToKindle (); + array_shift ($book->datas); array_shift ($book->datas); $data = $book->GetMostInterestingDataToSendToKindle (); $this->assertEquals ("EPUB", $data->format);