Mock type | Tests duration |
---|---|
Native mocks | 160.10 seconds |
Mockery | 177.01 seconds (+10%) |
PHPUnit mocks | 232.29 seconds (+45%) |
Prophecy | 3868.80 seconds (+2416%) |
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
(function(){ | |
let list=document.querySelectorAll('.event--vote-stars'); | |
let score = 0; | |
for (let i=0,l=list.length;i<l;i++) { | |
let el=list[i]; | |
score+=el.querySelectorAll('a.star.is-selected').length; | |
} | |
console.info(score/list.length); | |
})(); |
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 | |
/** | |
* This file is part of the corahn_rin package. | |
* | |
* (c) Alexandre Rock Ancelet <alex@orbitale.io> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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 | |
declare(strict_types=1); | |
namespace Tests; | |
use Symfony\Bundle\FrameworkBundle\KernelBrowser; | |
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase as BaseWebTestCase; | |
use Symfony\Component\BrowserKit\Cookie; | |
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; |
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
# Change the current background according to a distant URL. | |
# Needs the "feh" package to work. | |
DISPLAY=:0 XAUTHORITY=$HOME/.Xauthority feh --bg-center http://rammb.cira.colostate.edu/ramsdis/online/images/latest/himawari-8/full_disk_ahi_natural_color.jpg | |
# Source: https://twitter.com/docteur_klein/status/1130730930031779840 |
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 | |
declare(strict_types=1); | |
/* | |
* (c) Alexandre Rock Ancelet <pierstoval@gmail.com> and Studio Agate. | |
* | |
* Licensed with MIT | |
*/ |
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
docker run \ | |
--name=mysql_host \ | |
-dit -e MYSQL_ROOT_PASSWORD=mysql \ | |
-p 3306:3306 \ | |
mysql:5.7 |
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
RTDIR = ${REQUEST_TRACKER_DIR} | |
echo: | |
@echo "${WOW}" | |
## | |
## RequestTracker | |
## -------------- | |
## |
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 | |
$finder = PhpCsFixer\Finder::create() | |
->exclude([ | |
'vendor', | |
]) | |
->in([ | |
__DIR__.'/src/', | |
__DIR__.'/tests/' | |
]) |
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 | |
$h = fopen('php://memory', 'ab+'); | |
$gd = @imagecreate(110, 20); | |
if (false === $gd) { | |
throw new \RuntimeException('GD image is invalid'); | |
} |