Skip to content
This repository
Browse code

Add test for TRAC-1021.

  • Loading branch information...
commit 8442ae22e67ee132a494fb65bcef9ad61665a0e8 1 parent b5a059a
Sebastian Bergmann authored
19 PHPUnit/Tests/Regression/1021.phpt
... ... @@ -0,0 +1,19 @@
  1 +--TEST--
  2 +#1021: Depending on a test that uses a data provider does not work
  3 +--FILE--
  4 +<?php
  5 +$_SERVER['argv'][1] = '--no-configuration';
  6 +$_SERVER['argv'][2] = 'Issue1021Test';
  7 +$_SERVER['argv'][3] = 'Regression/1021/Issue1021Test.php';
  8 +
  9 +require_once dirname(dirname(dirname(__FILE__))) . '/TextUI/Command.php';
  10 +PHPUnit_TextUI_Command::main();
  11 +?>
  12 +--EXPECTF--
  13 +PHPUnit %s by Sebastian Bergmann.
  14 +
  15 +..
  16 +
  17 +Time: %i %s, Memory: %sMb
  18 +
  19 +OK (2 tests, 1 assertion)
23 PHPUnit/Tests/Regression/1021/Issue1021Test.php
... ... @@ -0,0 +1,23 @@
  1 +<?php
  2 +class Issue1021Test extends PHPUnit_Framework_TestCase
  3 +{
  4 + /**
  5 + * @dataProvider provider
  6 + */
  7 + public function testSomething($data)
  8 + {
  9 + $this->assertTrue($data);
  10 + }
  11 +
  12 + /**
  13 + * @depends testSomething
  14 + */
  15 + public function testSomethingElse()
  16 + {
  17 + }
  18 +
  19 + public function provider()
  20 + {
  21 + return array(array(true));
  22 + }
  23 +}

0 comments on commit 8442ae2

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