Skip to content

Instantly share code, notes, and snippets.

View tiraeth's full-sized avatar

Marcin Chwedziak tiraeth

View GitHub Profile
@tiraeth
tiraeth / composer.json
Created October 30, 2013 17:51
Example usage of mach/silex-rest
{
"require": {
"mach/silex-rest": "dev-master"
},
"autoload": {
"psr-0": { "": "src/" }
}
}
@tiraeth
tiraeth / patch.diff
Created July 12, 2014 22:27
padraic/mockery: fix __construct and __destruct behaviour
diff --git a/library/Mockery/Container.php b/library/Mockery/Container.php
index 0d7bdf2..f412c5b 100644
--- a/library/Mockery/Container.php
+++ b/library/Mockery/Container.php
@@ -193,7 +193,7 @@ class Container
$builder->addBlackListedMethods($blocks);
if (!is_null($constructorArgs)) {
- $builder->addBlackListedMethod("__construct"); // we need to pass through
+ $builder->addBlackListedMethods(array("__construct", "__destruct")); // we need to pass through
diff --git a/library/Mockery/Container.php b/library/Mockery/Container.php
index 0d7bdf2..a5db81f 100644
--- a/library/Mockery/Container.php
+++ b/library/Mockery/Container.php
@@ -200,6 +200,10 @@ class Container
$constructorArgs = array();
}
+ if (empty($partialMethods)) {
+ $builder->addBlackListedMethod("__destruct");