This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Take a string_like_this and return a StringLikeThis | |
* | |
* @param string | |
* @return string | |
*/ | |
function _snakeToCamel($val) { | |
return str_replace(' ', '', ucwords(str_replace('_', ' ', $val))); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once dirname(__DIR__).'/../../../../app/AppKernel.php'; | |
/** | |
* Test case class helpful with Entity tests requiring the database interaction. | |
* For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead. | |
*/ | |
abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html --> | |
<phpunit bootstrap = "../../../../app/bootstrap.php.cache" | |
backupGlobals = "false" | |
backupStaticAttributes = "false" | |
colors = "true" | |
convertErrorsToExceptions = "true" | |
convertNoticesToExceptions = "true" | |
convertWarningsToExceptions = "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Simple excel writer class with no external dependencies, drop it in and have fun | |
* @author Matt Nowack | |
* @license Unlicensed | |
* @version 1.0 | |
*/ | |
class Excel { | |
private $col; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$salt = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Panda86\AppBundle\Tests; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
use Symfony\Bundle\FrameworkBundle\Console\Application; | |
use Symfony\Component\Console\Input\ArrayInput; | |
use Symfony\Component\Console\Input\StringInput; | |
class FunctionalTestCase extends WebTestCase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Page not found!</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- Le styles --> | |
{% block stylesheets %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class EmailTestCase extends PHPUnit_Framework_TestCase { | |
/** | |
* @var \Guzzle\Http\Client | |
*/ | |
private $mailcatcher; | |
public function setUp() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config.yml | |
fos_rest: | |
format_listener: | |
rules: | |
- { path: ^/, priorities: [ json, xml, html ], fallback_format: ~, prefer_extension: false } | |
view: | |
view_response_listener: force | |
sensio_framework_extra: | |
view: { annotations: false } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guard :shell do | |
watch(%r{^spec/.+Spec.php}) { |m| | |
system("clear") | |
system("bin/phpspec run --no-interaction --format=pretty #{m[0]}") | |
} | |
watch(%r{^src/(.+).php}) { | |
system("clear") | |
system("bin/phpspec run --no-interaction --format=pretty") | |
} |
OlderNewer