Skip to content

Instantly share code, notes, and snippets.

View jrushlow's full-sized avatar

Jesse Rushlow jrushlow

View GitHub Profile
@jrushlow
jrushlow / ResetPasswordControllerTest.php
Created March 26, 2024 15:57
Quick and dirty reset password test
<?php
namespace App\Tests\Functional;
use App\Entity\User;
use Doctrine\ORM\EntityManager;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
class ResetPasswordControllerTest extends WebTestCase
@jrushlow
jrushlow / docker-compose.yaml
Created February 2, 2021 16:11
docker-compose.yaml
version: '3.7'
services:
database:
image: 'postgres:latest'
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: main
POSTGRES_DB: main
ports:
# To allow the host machine to access the ports below, modify the lines below.
@jrushlow
jrushlow / lines.txt
Created July 23, 2020 05:36
Lines of code committed by author for repo
git ls-files | xargs -n1 git blame --line-porcelain | sed -n 's/^author //p' | sort -f | uniq -ic | sort -nr
@jrushlow
jrushlow / ResetPasswordController.php
Last active February 23, 2020 20:17
DO NOT USE - Example of a reset password controller - WIP
<?php
namespace App\Controller;
use ....
/**
* @Route("/forgot-password")
*/
class ForgotPasswordController extends AbstractController
@jrushlow
jrushlow / AbstractModelUnitTest.php
Created February 11, 2020 14:25
Abstract unit test for models - used early on in dev, useless tests after prototype...
<?php
namespace .....\tests\UnitTests\Model;
use PHPUnit\Framework\TestCase;
use .....\tests\Contract\ModelUnitTestInterface;
/**
* @author Jesse Rushlow <jr@rushlow.dev>
*/