Skip to content

Instantly share code, notes, and snippets.

@nezarfadle
Last active May 26, 2017 04:48
Show Gist options
  • Save nezarfadle/24acf50b9a7bd1d56eead17f6873f412 to your computer and use it in GitHub Desktop.
Save nezarfadle/24acf50b9a7bd1d56eead17f6873f412 to your computer and use it in GitHub Desktop.

File: tests/TestCase.php

namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
{
    use CreatesApplication;

    public function setup()
    {
    	parent::setup();
    	$testName = str_replace(["test", "_"], ["", " "], $this->getName());
    	$testName = preg_replace_callback("/([a-zA-Z0-9]{3,}\b)/", function($match){
    		return ucfirst($match[0]);
    	}, $testName);

    	dump(" ->" . $testName);
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment