Add another test
這個提交存在於:
父節點
f892a780e7
當前提交
ecfc8f5e5c
共有 1 個檔案被更改,包括 14 行新增 和 0 行删除
|
|
@ -153,6 +153,20 @@ class BookTest extends PHPUnit_Framework_TestCase
|
||||||
$this->assertEquals ("Strand Magazine", $book->getPublisher()->name);
|
$this->assertEquals ("Strand Magazine", $book->getPublisher()->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testGetMostInterestingDataToSendToKindle ()
|
||||||
|
{
|
||||||
|
// Get Alice (available as MOBI, PDF, EPUB in that order)
|
||||||
|
$book = Book::getBookById(17);
|
||||||
|
$data = $book->GetMostInterestingDataToSendToKindle ();
|
||||||
|
$this->assertEquals ("MOBI", $data->format);
|
||||||
|
array_shift ($book->datas);
|
||||||
|
$data = $book->GetMostInterestingDataToSendToKindle ();
|
||||||
|
$this->assertEquals ("PDF", $data->format);
|
||||||
|
array_shift ($book->datas);
|
||||||
|
$data = $book->GetMostInterestingDataToSendToKindle ();
|
||||||
|
$this->assertEquals ("EPUB", $data->format);
|
||||||
|
}
|
||||||
|
|
||||||
public function testTypeaheadSearch ()
|
public function testTypeaheadSearch ()
|
||||||
{
|
{
|
||||||
$_GET["query"] = "fic";
|
$_GET["query"] = "fic";
|
||||||
|
|
|
||||||
載入中…
新增表格
Add a link
新增問題並參考