add Basic Shopware API

add Tests
This commit is contained in:
Marko
2022-06-28 17:20:37 +02:00
parent b5085fc848
commit 460411ab43
13 changed files with 2328 additions and 247 deletions

16
tests/OrdersTest.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
namespace App\Tests;
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\ApiTestCase;
class OrdersTest extends ApiTestCase
{
public function testSomething(): void
{
$response = static::createClient()->request('GET', '/');
$this->assertResponseIsSuccessful();
$this->assertJsonContains(['@id' => '/']);
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace App\Tests\Shopware;
use PHPUnit\Framework\TestCase;
class OrdersTest extends TestCase
{
public function testSomething(): void
{
$this->assertTrue(true);
}
}

11
tests/bootstrap.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php';
if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
require dirname(__DIR__).'/config/bootstrap.php';
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
}