Skip to content
This repository
Browse code

Deprecate BDD functionality.

  • Loading branch information...
commit 6aa9183496f9bb2131d17ba08195a93a07937762 1 parent 86ac86a
Sebastian Bergmann authored September 19, 2010
22  PHPUnit/TextUI/Command.php
@@ -436,16 +436,34 @@ protected function handleArguments(array $argv)
436 436
                 break;
437 437
 
438 438
                 case '--story': {
  439
+                    $this->showMessage(
  440
+                      'The --story functionality is deprecated and ' .
  441
+                      'will be removed in the future.',
  442
+                      FALSE
  443
+                    );
  444
+
439 445
                     $this->arguments['printer'] = new PHPUnit_Extensions_Story_ResultPrinter_Text;
440 446
                 }
441 447
                 break;
442 448
 
443 449
                 case '--story-html': {
  450
+                    $this->showMessage(
  451
+                      'The --story-html functionality is deprecated and ' .
  452
+                      'will be removed in the future.',
  453
+                      FALSE
  454
+                    );
  455
+
444 456
                     $this->arguments['storyHTMLFile'] = $option[1];
445 457
                 }
446 458
                 break;
447 459
 
448 460
                 case '--story-text': {
  461
+                    $this->showMessage(
  462
+                      'The --story-text functionality is deprecated and ' .
  463
+                      'will be removed in the future.',
  464
+                      FALSE
  465
+                    );
  466
+
449 467
                     $this->arguments['storyTextFile'] = $option[1];
450 468
                 }
451 469
                 break;
@@ -789,9 +807,6 @@ protected function showHelp()
789 807
   --coverage-html <dir>    Generate code coverage report in HTML format.
790 808
   --coverage-clover <file> Write code coverage data in Clover XML format.
791 809
 
792  
-  --story-html <file>      Write Story/BDD results in HTML format to file.
793  
-  --story-text <file>      Write Story/BDD results in Text format to file.
794  
-
795 810
   --testdox-html <file>    Write agile documentation in HTML format to file.
796 811
   --testdox-text <file>    Write agile documentation in Text format to file.
797 812
 
@@ -803,7 +818,6 @@ protected function showHelp()
803 818
   --loader <loader>        TestSuiteLoader implementation to use.
804 819
   --repeat <times>         Runs the test(s) repeatedly.
805 820
 
806  
-  --story                  Report test execution progress in Story/BDD format.
807 821
   --tap                    Report test execution progress in TAP format.
808 822
   --testdox                Report test execution progress in TestDox format.
809 823
 
4  Tests/TextUI/help.phpt
@@ -21,9 +21,6 @@ Usage: phpunit [switches] UnitTest [UnitTest.php]
21 21
   --coverage-html <dir>    Generate code coverage report in HTML format.
22 22
   --coverage-clover <file> Write code coverage data in Clover XML format.
23 23
 
24  
-  --story-html <file>      Write Story/BDD results in HTML format to file.
25  
-  --story-text <file>      Write Story/BDD results in Text format to file.
26  
-
27 24
   --testdox-html <file>    Write agile documentation in HTML format to file.
28 25
   --testdox-text <file>    Write agile documentation in Text format to file.
29 26
 
@@ -35,7 +32,6 @@ Usage: phpunit [switches] UnitTest [UnitTest.php]
35 32
   --loader <loader>        TestSuiteLoader implementation to use.
36 33
   --repeat <times>         Runs the test(s) repeatedly.
37 34
 
38  
-  --story                  Report test execution progress in Story/BDD format.
39 35
   --tap                    Report test execution progress in TAP format.
40 36
   --testdox                Report test execution progress in TestDox format.
41 37
 
4  Tests/TextUI/help2.phpt
@@ -22,9 +22,6 @@ Usage: phpunit [switches] UnitTest [UnitTest.php]
22 22
   --coverage-html <dir>    Generate code coverage report in HTML format.
23 23
   --coverage-clover <file> Write code coverage data in Clover XML format.
24 24
 
25  
-  --story-html <file>      Write Story/BDD results in HTML format to file.
26  
-  --story-text <file>      Write Story/BDD results in Text format to file.
27  
-
28 25
   --testdox-html <file>    Write agile documentation in HTML format to file.
29 26
   --testdox-text <file>    Write agile documentation in Text format to file.
30 27
 
@@ -36,7 +33,6 @@ Usage: phpunit [switches] UnitTest [UnitTest.php]
36 33
   --loader <loader>        TestSuiteLoader implementation to use.
37 34
   --repeat <times>         Runs the test(s) repeatedly.
38 35
 
39  
-  --story                  Report test execution progress in Story/BDD format.
40 36
   --tap                    Report test execution progress in TAP format.
41 37
   --testdox                Report test execution progress in TestDox format.
42 38
 
2  Tests/TextUI/story-isolation.phpt
@@ -14,4 +14,6 @@ PHPUnit_TextUI_Command::main();
14 14
 --EXPECTF--
15 15
 PHPUnit %s by Sebastian Bergmann.
16 16
 
  17
+The --story functionality is deprecated and will be removed in the future.
  18
+
17 19
 The story result printer cannot be used in process isolation.
2  Tests/TextUI/story.phpt
@@ -13,6 +13,8 @@ PHPUnit_TextUI_Command::main();
13 13
 --EXPECTF--
14 14
 PHPUnit %s by Sebastian Bergmann.
15 15
 
  16
+The --story functionality is deprecated and will be removed in the future.
  17
+
16 18
 BowlingGameSpec
17 19
  [x] Score for gutter game is 0
18 20
 

4 notes on commit 6aa9183

Gunnar Wrobel

Will there be some kind of replacement for this functionality?

Joseph Bielawski

I think that Behat (http://github.com/everzet/Behat) could be kinda replacement.

Gunnar Wrobel

@stloyd: Ah, thanks for the hint. I saw that Sebastian forked that yesterday so I guess that is probable then. Will have a look to get an idea of how the migration might look like.

@Sebastian: Can you confirm stloyds assumption?

Sebastian Bergmann

PHPUnit's BDD functionality is deprecated in PHPUnit 3.5 and will be removed in PHPUnit 3.6. The primary reason for this is that it is unmaintained and does not, for instance, work correctly when used together with other features such as the process isolation. With the availability of Behat, which looks much more powerful, I felt comfortable enough to take this step.

Please sign in to comment.
Something went wrong with that request. Please try again.