DataSift\Storyplayer\PlayerLib\Story::setCategory PHP Method

setCategory() public method

Systems under test can grow to encompass hundreds, if not thousands of user stories. To make this manageable at scale, we break down each user story like this: Name : Starts as a free user with 10 USD in credit Category: Billing User Stories Group : User States The 'name' is the summary text of the user story itself, which should be no longer than a single sentence, please. The 'category' is the general group that the user story belongs to. These are the top-level groups, such as 'Registration', 'Billing' and so forth. The 'group' is the specific group _inside_ the category that the user story belongs to. The groups are specific to the category.
public setCategory ( string $newCategory ) : Story
$newCategory string the category that this story belongs to
return Story $this
    public function setCategory($newCategory)
    {
        $this->category = $newCategory;
        return $this;
    }

Usage Example

コード例 #1
0
ファイル: functions.php プロジェクト: datasift/storyplayer
/**
 * Create a new story object
 *
 * @param  string $category the category that the story belongs to
 * @return Story            the new story object to use
 */
function newStoryFor($category)
{
    $story = new Story();
    $story->setCategory($category);
    // our output reports may need to know which file the story itself
    // is defined in
    $story->determineStoryFilename();
    return $story;
}