Again more test functions.

This commit is contained in:
Sébastien Lucas 2014-04-29 16:18:18 +02:00
父節點 8d18f19e44
當前提交 88ff8f5409
共有 1 個檔案被更改,包括 16 行新增1 行删除

查看文件

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