Again more test functions.
这个提交存在于:
父节点
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);
|
||||
|
|
|
|||
正在加载…
添加表格
添加链接
在新工单中引用