本文整理汇总了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);
}