This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fch@gimli:/var/www/webloc3.lan(sf21) | |
622> php ./bin/behat src/Webloc/WeblocAuthBundle/Features/login.feature | |
.string(70) "Values of cookie jar in Symfony\\Component\\BrowserKit\\Client::request: " | |
array(0) { | |
} | |
string(101) "REQUEST: GET /app_test.php/ HTTP/1.1\r\nHost: webloc3.lan\r\nHttps: \r\nUser-Agent: Symfony2 BrowserKit\r\n\r\n" | |
string(921) "RESPONSE: Date: Wed, 18 Jul 2012 13:51:24 GMT\nServer: Apache/2.2.20 (Ubuntu)\nX-Powered-By: PHP/5.3.14-1~dotdeb.0\nlocation: http://webloc3.lan/app_test.php/login\ncache-control: no-cache, max-age=2592000\nx-debug-token: 5006bf5cae470\nSet-Cookie: MOCKSESSID=d8a0b700978a40e3e38771ae2fbe4eb94cd91d64; expires=Wed, 18-Jul-2012 14:51:24 GMT; path=/\nExpires: Fri, 17 Aug 2012 13:51:24 GMT\nVary: Accept-Encoding\nContent-Encoding: gzip\nConnection: close\nContent-Type: text/html; charset=UTF-8\n\n<!DOCTYPE html>"... | |
string(70) "Values of cookie jar in Symfony\\Component\\BrowserKit\\Client::request: " | |
array(1) { | |
'MOCKSESSID' => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class phpClass {}; | |
class_alias('phpClass', 'class'); | |
$className = 'class'; | |
$class = new $className(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$request = new atoum\fpm\request(); | |
$request->request_method = 'GET'; | |
$request->script_filename = __DIR__ . DIRECTORY_SEPARATOR . 'post.php'; | |
$request->query_string = 'query=1234'; | |
var_dump($request(new atoum\fpm\client('127.0.0.1', '9000'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$request = new atoum\fpm\request(); | |
$request->request_method = 'POST'; | |
$request->script_filename = __DIR__ . DIRECTORY_SEPARATOR . 'post.php'; | |
$request->content_type = 'application/x-www-form-urlencoded'; | |
$request->stdin = 'query=1234'; | |
var_dump($request(new atoum\fpm\client('127.0.0.1', '9000'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Sample fcgi configuration file. | |
Do "php path/to/test/file -c path/to/this/file" or "php path/to/atoum/scripts/runner.php -c path/to/this/file -f path/to/test/file" to use it. | |
*/ | |
use | |
mageekguy\atoum, | |
mageekguy\atoum\test\engines\fcgi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fch@Tornade:~/Atoum/repository(master *$%) | |
21> php scripts/runner.php --test-all | |
> PHP path: /usr/local/bin/php | |
> PHP version: | |
=> PHP 5.4.5 (cli) (built: Jul 24 2012 21:39:33) | |
=> Copyright (c) 1997-2012 The PHP Group | |
=> Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies | |
> mageekguy\atoum\tests\units\adapter... | |
[SS__________________________________________________________][2/2] | |
=> Test duration: 0.01 second. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function isNearlyEqualTo($value, $epsilon = null, $failMessage = null) | |
{ | |
static::check($value, __METHOD__); | |
// see http://www.floating-point-gui.de/errors/comparison/ for more informations | |
$originalValue = abs($this->valueIsSet()->value); | |
$value = abs($value); | |
$diff = abs($originalValue - $value); | |
if ($epsilon === null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
And it's AWESOME ! | |
Imagine that you have a class like this : | |
*/ | |
namespace mageekguy\atoum; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Guile: salut à tous | |
jubianchi[work]: salut Guile | |
marmotz: salut Guile | |
marmotz: (ça fait un peu réunion des alcoolique anonyme, là...) | |
marmotz: Bonjour, je m'appelle Renaud et ça fait 6 mois que je n'ai pas touché une ligne de PHPUnit. | |
Guile: Bonjouuuuuuur Renauuuuuud… | |
marmotz: il y a quelques jours, j'ai failli replonger | |
marmotz: mais j'ai résisté | |
marmotz: j'ai réécris intégralement tous les tests unitaires avec atoum | |
marmotz: et je me sens mieux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class bigFileFilterIterator extends recursiveFilterIterator | |
{ | |
protected $minSize = 0; | |
public function __construct(recursiveIterator $iterator, $minSize = 10000) | |
{ | |
parent::__construct($iterator); |