##Given Apache 2 and MySQL are already installed.
#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules
<?php | |
define('TEST_KEY', 'are_we_glued'); | |
$redis = new Redis(); | |
try { | |
$redis->connect('localhost', 6379); | |
$redis->set(TEST_KEY, 'yes'); | |
$glueStatus = $redis->get(TEST_KEY); | |
if ($glueStatus) { | |
$testKey = TEST_KEY; | |
echo "Glued with the Redis key value store:" . PHP_EOL; |
##Given Apache 2 and MySQL are already installed.
#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules
#!/usr/bin/php | |
<?php | |
printf("%sGit pre-commit hook %1\$s", PHP_EOL); | |
$projectName = basename(getcwd()); | |
exec('phpunit --configuration phpunit.xml', $output, $returnCode); // Assuming cwd here | |
if ($returnCode !== 0) { | |
$minimalTestSummary = array_pop($output); | |
printf("Test suite for %s failed: ", $projectName); | |
printf("( %s ) %s%2\$s", $minimalTestSummary, PHP_EOL); | |
return false; // exit(1); |
<?php | |
/** | |
* PHPUnit | |
* | |
* Copyright (c) 2002-2010, Sebastian Bergmann <sb@sebastian-bergmann.de>. | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: |
#Migrating from homebrew-php to phpbrew
After installing phpbrew it's time to install a set of chosen PHP versions. My picks at the time of this writing were:
sudo phpbrew install php-5.5.0 +default+dbs+mb+apxs2=/usr/sbin/apxs
sudo phpbrew install php-5.4.17 +default+dbs+mb+apxs2=/usr/sbin/apxs
sudo phpbrew install php-5.3.27 +default+dbs+mb+apxs2=/usr/sbin/apxs
When not sure where apxs is located on your system, whereis apxs
is quite chatty.
$app->after(function (Request $request, Response $response) { | |
$appl = $request->attributes->get('app'); | |
if ($request->get('jsonp_callback') !== null | |
&& $request->getMethod() === 'GET') | |
{ | |
/** | |
* Configured via ConfigServiceProvider (https://github.com/igorw/ConfigServiceProvider) | |
* Example: | |
* |
#!/usr/bin/php | |
<?php | |
define('DEPENDENT_EXTENSION', 'SimpleXML'); | |
if (!extension_loaded(DEPENDENT_EXTENSION)) { | |
$consoleMessage = sprintf( | |
"Skipping build file checks as the '%s' extension isn't available.", | |
DEPENDENT_EXTENSION | |
); | |
echo $consoleMessage . PHP_EOL; |
<?php | |
/* | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
Index: TicketListener.php | |
=================================================================== | |
--- TicketListener.php | |
+++ TicketListener.php | |
@@ -207,14 +207,16 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te | |
} else { | |
$adjustTicket = TRUE; | |
} | |
+ | |
+ $ticketInfo = $this->getTicketInfo($ticket); |
<?php | |
class PHPUnit_Extensions_TestListener_GrowlTestListener | |
implements PHPUnit_Framework_Testlistener | |
{ | |
const TEST_RESULT_COLOR_RED = 'red'; | |
const TEST_RESULT_COLOR_YELLOW = 'yellow'; | |
const TEST_RESULT_COLOR_GREEN = 'green'; | |
private $_errors = array(); |