Skip to content

Instantly share code, notes, and snippets.

View geanruca's full-sized avatar
👽
Follow the rabbit

Gerardo Ruiz geanruca

👽
Follow the rabbit
View GitHub Profile
@oleg-andreyev
oleg-andreyev / WithConsecutive.php
Created July 20, 2023 14:50
WithConsecutive polyfill
<?php
/**
Usage: ->with(...WithConsecutive::create(...$withCodes))
*/
declare(strict_types=1);
namespace App\Tests;
@ziadoz
ziadoz / FooTest.php
Last active August 4, 2023 10:41
PHPUnit 10 - Replacement for deprecated withConsecutive() method
<?php
// @see: https://github.com/sebastianbergmann/phpunit/issues/4026
// Use `$this->with(...$this->consecutiveParams($args1, $args2))` instead of `$this->withConsecutive($args1, $args2)`.
use PHPUnit\Framework\TestCase;
class FooTest extends TestCase
{
use ConsecutiveParams;
anonymous
anonymous / MailTracking.php
Created November 9, 2017 14:51
<?php
namespace Tests;
use Mail;
use Swift_Message;
use Swift_Events_EventListener;
trait MailTracking
{
/**
* Delivered emails.