Skip to content

Instantly share code, notes, and snippets.

View edorian's full-sized avatar

Volker Dusch edorian

View GitHub Profile
#! /usr/bin/env php
<?php
if ($_SERVER['argc'] != 2) {
printf("%s: Converts assertType() into assertInternalType() or assertInstanceOf()\n\n", basename(__FILE__));
printf("Usage: %s <tests directory>\n", basename(__FILE__));
exit(11);
}
$directories = new RegexIterator(
new RecursiveIteratorIterator(
@lapistano
lapistano / clean-use.php
Created December 9, 2011 11:11 — forked from ezzatron/clean-use.php
Script to clean unnecessary PHP use statements
#!/usr/bin/env php
<?php
$paths = array();
if (isset($_SERVER['argv']))
{
$paths = $_SERVER['argv'];
array_shift($paths);
if (!$paths)
@digitalkaoz
digitalkaoz / BaseTestCase.php
Created November 24, 2012 14:03
PHPUnit Cache Clear beforeClass
<?php
namespace Lingwa\Bundle\CoreBundle\Test;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
abstract class BaseTestCase extends WebTestCase
{
static $cleared = false;
public static function setupBeforeClass()
@lox
lox / simpletest-to-phpunit.php
Created December 3, 2012 19:12
A script for converting a test from SimpleTest to PHPUnit
#!/usr/bin/env php
<?php
/**
* Convert SimpleTest tests to PHPUnit, mocks to Mockery.
*
* Caveats:
* - Assertion + return value can't be combined automatically
*/