Usage:
php script.php test.plt
Sample output:
G01 X-7626 Y-392 Z0
<?php | |
/** | |
* @author Matthieu Napoli | |
* @link http://en.mnapoli.fr/doctrine-schema-validation-in-a-phpunit-test/ | |
* @license WTFPL - Do What The Fuck You Want To Public License (http://sam.zoy.org/wtfpl/) | |
*/ | |
use Doctrine\ORM\Tools\SchemaValidator; | |
/** |
Usage:
php script.php test.plt
Sample output:
G01 X-7626 Y-392 Z0
#!/bin/bash | |
set -e | |
cd /tmp | |
echo "Installing PHP" | |
#mkdir /tmp/php | |
#curl -sSL https://s3-eu-west-1.amazonaws.com/mnapoli/test-aws/php.tar.gz | tar -xz -C /tmp/php |
<?php | |
namespace PHPSTORM_META { | |
$STATIC_METHOD_TYPES = [ | |
\PHPUnit_Framework_TestCase::createMock('') => [ | |
"" == "@|PHPUnit_Framework_MockObject_MockObject", | |
], | |
\PHPUnit_Framework_TestCase::getMock('') => [ | |
"" == "@|PHPUnit_Framework_MockObject_MockObject", | |
], |
can be used with | foreach(… |
array_*(…) functions |
yield from … |
array type-hint |
Traversable type-hint |
can be implemented |
---|---|---|---|---|---|---|
array | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
Traversable | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ |
iterable | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
<?php | |
namespace TwigModule; | |
use Interop\Container\ContainerInterface; | |
use Interop\Container\ServiceProvider\ServiceProvider; | |
use Puli\Repository\Api\ResourceRepository; | |
use Puli\TwigExtension\PuliExtension; | |
use Puli\TwigExtension\PuliTemplateLoader; | |
use Puli\UrlGenerator\Api\UrlGenerator; |
<?php | |
class Image | |
{ | |
private $width; | |
private $height; | |
private $content; | |
public static function createEmpty($width, $height, $bgcolor = null) | |
{ |
<?php | |
class MyTest extends PHPUnit_Framework_TestCase | |
{ | |
public function testSomeStuff() | |
{ | |
// Build my mock | |
$mock = new class extends CrawlerInterface { | |
public function crawl($url) { | |
return ['some', 'data']; |