Skip to content

Instantly share code, notes, and snippets.

View beberlei's full-sized avatar
💯

Benjamin Eberlei beberlei

💯
View GitHub Profile
<?php
$options = array(
'argument_functions' => array(
'file_get_contents',
'curl_exec',
'fgets',
'fputs',
'fread',
'fgetcsv',
$products = array();
foreach($arr['accounts'] as $val) {
$account_id = $val['account_id'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, 'https://api.appannie.com/v1.2/accounts/'.$account_id.'/sales?break_down=product&start_date=2015-01-01&end_date=2015-01-31');
@beberlei
beberlei / phpunit_php7.patch
Last active August 29, 2015 14:16
PHPUnit necessary chanegs for PHP7 Coercive Typehints
diff --git a/src/Framework/TestSuite.php b/src/Framework/TestSuite.php
index 1b3b339..71ee4a9 100644
--- a/src/Framework/TestSuite.php
+++ b/src/Framework/TestSuite.php
@@ -878,7 +878,11 @@ public static function isTestMethod(ReflectionMethod $method)
// @scenario on TestCase::testMethod()
// @test on TestCase::testMethod()
- $doc_comment = $method->getDocComment();
+ $doc_comment = (string)$method->getDocComment();
Configure Command => './configure' '--enable-soap' '--enable-sockets' '--with-pdo-mysql=shared' '--enable-pdo=shared' '--with-pdo-sqlite=shared' '--with-sqlite=shared' '--with-curl=/usr/include/curl' '--with-config-file-path=/etc/php5/cli' '--with-config-file-scan-dir=/etc/php5/cli/conf.d'
#!/usr/bin/env php
<?php
/**
* PHPUnit
*
* Copyright (c) 2002-2009, Sebastian Bergmann <sb@sebastian-bergmann.de>.
* Copyright (c) 2009, Benjamin Eberlei <kontakt@beberlei.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
<?php
/**
* @package Whitewashing
* @subpackage PHPUnit
* @license BSD License {@link http://www.opensource.org/licenses/bsd-license.php}
* @author Benjamin Eberlei (kontakt@beberlei.de)
*
* Copyright (c) 2009, Benjamin Eberlei
* All rights reserved.
*
<?php
/**
* @package Whitewashing
*
*/
class Whitewashing_Controller_Helper_Container extends Zend_Controller_Action_Helper_Abstract
{
/**
* @var Yadif_Container
*/
<?php
class Zend_Entity_Query extends Zend_Entity_Query_Abstract
{
public function where($property, $operatorOrValue, $valueOrConditionName = null, $conditionName = null)
{
return $this;
}
public function combine(array $conditionNames, $operation, $combinedConditionName = null)
<?php
class Zend_Reflection_DocblockParserTest extends PHPUnit_Framework_TestCase
{
public function testTokenizesimpleDocBlock()
{
$input = "hello world this is a description
@param string \$foo
@return int";
<?php
/**
* Copyright (c) 2009, Benjamin Eberlei
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.