Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * Another example of PHP method chaining
4
 *
5
 * @link http://sebastian-bergmann.de/archives/738-Support-for-BDD-and-Stories-in-PHPUnit-3.3.html
6
 */
7
 
8
require_once 'PHPUnit/Extensions/Story/TestCase.php';
9
 
10
require_once 'BowlingGame.php';
11
 
12
class BowlingGameSpec extends PHPUnit_Extensions_Story_TestCase
13
{
14
    /**
15
     * @scenario
16
     */
17
    function scoreForOneSpareIs16()
18
    {
19
        $this->given('New game')
20
             ->when('Player rolls', 5)
21
             ->and('Player rolls', 5)
22
             ->and('Player rolls', 3)
23
             ->then('Score should be', 16);
24
    }
25
}
26
?>