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
Le contexte : | |
- Une suite de tests qui doit être exécutée avec un navigateur compatible javascript, pour tester un front en React. Comme j'aimerai éviter la lourdeur de selenium, je voudrais que behat discuter directement avec ledit navigateur via webdriver ; | |
- Une suite de tests qui doit être exécutée avec un navigateur pas forcément compatible JS, pour tester une API basée sur Symfony 5.4 et pas avec webdriver parce que ce dernier a le mauvais goût de ne pas remonter les codes de status HTTP, ce qui est un peu dérangeant pour tester une API HTTP. | |
Histoire de corser un peu plus le jeu, tout cela doit s'exécuter dans un environnement docker/docker-compose. | |
J'ai testé pas mal de choses : | |
1. https://packagist.org/packages/dmore/chrome-mink-driver : ne fonctionne pas, j'avais l'erreur `Fatal error: Uncaught Error: Call to a member function waitForLoad() on null in /src/vendor/dmore/chrome-mink-driver/src/ChromeDriver.php` dès que j'activais `Beatch/Extension`; | |
2. `Symfony/Panther` en combo avec `https://gith |
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
Scénario: | |
Étant donné qu'un message nommé "message 1" utilise le template réservé et contient "foo" | |
Et qu'un message nommé "message 2" utilise le template réservé et contient "bar" | |
Lorsqu'on demande le remplacement des messages avec les messages suivants : | |
| name | duration | months | days | weekdays | minutes | hours | order | priority | <= is it possible to have french column names? | |
| baz | 30 | * | * | * | * | * | 0 | no | | |
| qux | 55 | * | * | * | * | * | 0 | no | | |
Alors il doit exister 2 messages |
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 | |
namespace foo; | |
class message | |
{ | |
… | |
} | |
namespace ubermuda; |
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 namespace estvoyage\ticTacToe\tests\units\output\cli; | |
require __DIR__ . '/../../../runner.php'; | |
use estvoyage\ticTacToe\tests\units; | |
use mock\estvoyage\ticTacToe as mockOfTicTacToe; | |
class stderr extends units\test | |
{ | |
private |
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 foo | |
{ | |
function findAllAgentsBy() | |
{ | |
var_dump(__METHOD__, func_get_args()); | |
} | |
function findOneAgentBy() |
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
// Game | |
public class Game { | |
private final Grid grid; | |
private final PlacementError placementError; | |
private Mark playingMark; | |
public Game(PlacementError placementError) { | |
grid = new Grid(); | |
playingMark = Mark.x(); |
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
> './configure' '--prefix=/usr/local/Cellar/php56/5.6.24' '--localstatedir=/usr/local/var' '--sysconfdir=/usr/local/etc/php/5.6' '--with-config-file-path=/usr/local/etc/php/5.6' '--with-config-file-scan-dir=/usr/local/etc/php/5.6/conf.d' '--mandir=/usr/local/Cellar/php56/5.6.24/share/man' '--enable-bcmath' '--enable-calendar' '--enable-dba' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-mbregex' '--enable-mbstring' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--enable-zip' '--with-freetype-dir=/usr/local/opt/freetype' '--with-gd' '--with-gettext=/usr/local/opt/gettext' '--with-iconv-dir=/usr' '--with-icu-dir=/usr/local/opt/icu4c' '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-kerberos=/usr' '--with-libedit' '--with-mhash' '--with-ndbm=/usr' '--with-png-dir=/usr/local/opt/libpng' '--with-xmlrpc' '--with-zlib=/usr' '--with-readline=/usr/local/opt/readline' '--without-gmp' '--without-snmp' '--with-libxml-dir=/usr |
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 --version | |
PHP 7.0.12 (cli) (built: Nov 3 2016 12:54:26) ( NTS ) | |
Copyright (c) 1997-2016 The PHP Group | |
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies | |
# php -a | |
php > var_dump((PHP_INT_MAX + 1) > PHP_INT_MAX); | |
bool(false) | |
php > var_dump((PHP_INT_MAX + 1) < PHP_INT_MAX); | |
bool(false) | |
php > var_dump((PHP_INT_MAX + 1) == PHP_INT_MAX); |
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 | |
namespace estvoyage\risingsun\tests\units; | |
use | |
mageekguy\atoum\mock | |
; | |
class test extends \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
<?php | |
interface base | |
{ | |
function adnFormaterIs(adnFormater $formater); | |
} | |
interface baseRecipient | |
{ | |
function baseIs(base $base); |
NewerOlder