Skip to content

Instantly share code, notes, and snippets.

View andriesss's full-sized avatar

Andriesss andriesss

  • Egeniq
  • Belgium
View GitHub Profile
@andriesss
andriesss / 2409.patch
Created February 22, 2019 14:03
2409.patch
Index: tests/Doctrine/Tests/DBAL/Connections/MasterSlaveConnectionTest.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- tests/Doctrine/Tests/DBAL/Connections/MasterSlaveConnectionTest.php (date 1550843977000)
+++ tests/Doctrine/Tests/DBAL/Connections/MasterSlaveConnectionTest.php (date 1550843977000)
@@ -0,0 +1,53 @@
+<?php
+
<?php
interface Comparable {
function compare(self $compare);
}
class Foo implements Comparable {
function compare(self $compare) {}
}
<?php
$img = new Imagick();
$img->readImage('car.jpg');
$draw = new ImagickDraw();
/*
* Contrast enhancement
*
<?php
$model = new SomeModel();
$model->setName('test');
$someService = $this->getMock('\My\Service\Some');
$someService
->expects($this->any())
->method('getAll')
->will($this->returnValue(array($model)));
<?php
class DummyTest extends PHPUnit_Framework_TestCase
{
/**
* @group example
* @dataProvider provider
*/
public function testFoo($a)
{
<?php
public function waitForElementNotPresent($locator, $retries = 0)
{
$retries = abs(ceil($retries));
do {
try {
return parent::waitForElementNotPresent($locator);
} catch (\Exception $e) {}
#include "IpRelay.h"
#include <stdexcept>
IpRelay::IpRelay(char *ipAddress, u_short port)
{
this->setIpAddress(ipAddress);
this->port = port;
this->sock = INVALID_SOCKET;
}
/* {{{ proto int strtotime(string time [, int now ])
Convert string representation of date and time to a timestamp */
PHP_FUNCTION(strtotime)
{
char *times, *initial_ts;
int time_len, error1, error2;
struct timelib_error_container *error;
long preset_ts = 0, ts;
timelib_time *t, *now;
@andriesss
andriesss / gist:4745015
Last active December 12, 2015 08:38
PHPUnit feature request to allow for docblock output while running tests
<?php
class UserTest extends PHPUnit_Extensions_SeleniumTestCase
{
/**
* Navigate to the registration page, and enter the following data in the registration form:
*
* - email: user@example.com
* - name: John Doe
*
<?php
/*
I would like to obtain the following elements:
<input type="text" name="foo[1]" />
<input type="text" name="bar[1]" />
*/