本文整理汇总了PHP中Author::setAuthorName方法的典型用法代码示例。如果您正苦于以下问题:PHP Author::setAuthorName方法的具体用法?PHP Author::setAuthorName怎么用?PHP Author::setAuthorName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Author
的用法示例。
在下文中一共展示了Author::setAuthorName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSetAuthorName
function testSetAuthorName()
{
$author_name = "Murakami";
$test_author = new Author($author_name);
$test_author->setAuthorName("Hemingway");
$result = $test_author->getAuthorName();
$this->assertEquals("Hemingway", $result);
}
示例2: Author
function test_author_setAuthorName()
{
//Arrange
$author_name = "Whitman";
$test_author = new Author($author_name);
//Act
$test_author->setAuthorName("Walty");
$result = $test_author->getAuthorName();
//Assert
$this->assertEquals("Walty", $result);
}
示例3: Author
function test_setAuthorName()
{
//Arrange
$name = "Uncle Ben";
$id = 1;
$test_author = new Author($name, $id);
//Act
$test_author->setAuthorName("Welcome to Puzzle Heaven");
$result = $test_author->getAuthorName();
//Assert
$this->assertEquals($result, "Welcome to Puzzle Heaven");
}
示例4: testSetAuthorName
function testSetAuthorName()
{
//Arrange
$author_name = "Stephen King";
$id = 1;
$test_author = new Author($author_name, $id);
//Act
$test_author->setAuthorName("Plato");
$result = $test_author->getAuthorName();
//Assert
$this->assertEquals("Plato", $result);
}