本文整理匯總了PHP中Book::getBookTitle方法的典型用法代碼示例。如果您正苦於以下問題:PHP Book::getBookTitle方法的具體用法?PHP Book::getBookTitle怎麽用?PHP Book::getBookTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Book
的用法示例。
在下文中一共展示了Book::getBookTitle方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetBookTitle
function testGetBookTitle()
{
//arrange
$book_title = 'Call of the Wild';
$test_book_title = new Book($book_title);
var_dump($book_title);
//act
$result = $test_book_title->getBookTitle();
//assert
$this->assertEquals($book_title, $result);
}
示例2: testUpdate
function testUpdate()
{
//Arrange
$book_title = "Snow Crash";
$id = null;
$test_book = new Book($book_title, $id);
$test_book->save();
$new_book_title = "Foundations Edge";
//Act
$test_book->update($new_book_title);
//Assert
$this->assertEquals("Foundations Edge", $test_book->getBookTitle());
}
示例3: Book
function test_searchTitle()
{
$title = "Three Blind Mice";
$test_book = new Book($title);
$test_book->save();
$title2 = "Chicken Dog";
$test_book2 = new Book($title2);
$test_book2->save();
$result = Book::searchTitle($test_book->getBookTitle());
$this->assertEquals([$test_book], $result);
}