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 ExampleTest extends FixtureTestCase | |
{ | |
/** | |
* @test | |
*/ | |
public function testSomething() : void | |
{ | |
$payout = $this->fixture()->payout(function (PayoutContext $payout) { |
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 | |
$payout = Factory::create()->payout(function (PayoutContext $payout) { | |
$payout->payoutId = PayoutId::fromString('03f74472-0e31-4d5c-8f61-bf34bda2dcb2'); | |
}); |
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 | |
$payout = Factory::create() | |
->withPayment(function (PaymentContext $payment) { | |
$payment->amount = new Money(1337, new Currency('USD')); | |
}) | |
->payout(function (PayoutContext $payout) { | |
$payout->payoutId = PayoutId::fromString('03f74472-0e31-4d5c-8f61-bf34bda2dcb2'); | |
}); |
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 PaymentContext | |
{ | |
/** | |
* @var PaymentId | |
*/ | |
public $paymentId; | |
/** |
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 PayoutContext | |
{ | |
/** | |
* @var PayoutId | |
*/ | |
public $payoutId; | |
/** |
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 | |
use Doctrine\Bundle\DoctrineBundle\Registry; | |
use Doctrine\Common\Persistence\ObjectManager; | |
use Doctrine\DBAL\Connection; | |
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | |
class FixtureTestCase extends KernelTestCase | |
{ | |
/** |
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 Factory | |
{ | |
/** | |
* @var array | |
*/ | |
private $contexts = []; | |
/** |
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 | |
// Test this using following command | |
// php reactphp.php | |
// curl http://localhost:8080 -d '{"query": "query { echo(message: \"Hello World\") }" }' | |
// curl http://localhost:8080 -d '{"query": "mutation { sum(x: 2, y: 2) }" }' | |
require_once __DIR__ . '/../vendor/autoload.php'; | |
use GraphQL\Executor\Promise\Adapter\ReactPromiseAdapter; | |
use GraphQL\GraphQL; | |
use GraphQL\Type\Definition\ObjectType; |
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
framework: | |
cache: | |
pools: | |
app.cache.doctrine_metadata: | |
adapter: cache.adapter.php_files | |
doctrine: | |
orm: | |
entity_managers: | |
default: |
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
require("babel/register"); | |
const dependencies = require('./src/dependencies'); | |
var WebpackIsomorphicTools = require('webpack-isomorphic-tools'); | |
var chokidar = require('chokidar'); | |
var webpack = require('webpack'); | |
var config = require('./config/webpack.config.dev'); | |
var compiler = webpack(config); | |
var app = dependencies.expressApp; | |
var Mocha = require('mocha'); |
NewerOlder