Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pascualmg/08a70d91c89677454991c552f7f07b9c to your computer and use it in GitHub Desktop.
Save pascualmg/08a70d91c89677454991c552f7f07b9c to your computer and use it in GitHub Desktop.

Revisions

  1. Pascual Muñoz created this gist Jun 29, 2020.
    28 changes: 28 additions & 0 deletions RefundModeToAfterSalesCaseAssociatorTest.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    <?php

    namespace Pcc\Domain\AfterSales\Service;

    use Doctrine\DBAL\Connection;
    use Pcc\Domain\AfterSales\RefundMode;
    use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

    class RefundModeToAfterSalesCaseAssociatorTest extends KernelTestCase
    {
    /** @var Connection */
    private $conn;

    protected function setUp(): void
    {
    self::bootKernel();
    $this->conn = self::$kernel->getContainer()->get('doctrine.dbal.default_connection');
    }

    public function test_given_when_then()
    {
    $someCaseId = 2263388;
    $service = new RefundModeToAfterSalesCaseAssociator(
    $this->conn
    );
    $service($someCaseId, RefundMode::credit());
    }
    }