Skip to content

Instantly share code, notes, and snippets.

@hidenorigoto
Created October 15, 2011 17:30
Show Gist options
  • Save hidenorigoto/1289863 to your computer and use it in GitHub Desktop.
Save hidenorigoto/1289863 to your computer and use it in GitHub Desktop.
StageHand_TestRunner
<?php
require_once __DIR__ . '/TestCaseBase.php';
class TargetTest extends TestCaseBase
{
public function testAlwaysTrue()
{
$this->assertTrue(true);
}
}
#!/bin/sh
phpunitrunner --test-file-pattern=TargetTest .
# --test-file-patternの対象のベースクラスもテストとして実行されてしまう
<?php
// ここはabstractにしておく必要がある
abstract class TestCaseBase extends PHPUnit_Framework_TestCase
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment