add Basic Shopware API
add Tests
This commit is contained in:
16
tests/OrdersTest.php
Normal file
16
tests/OrdersTest.php
Normal 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' => '/']);
|
||||
}
|
||||
}
|
||||
13
tests/Shopware/OrdersTest.php
Normal file
13
tests/Shopware/OrdersTest.php
Normal 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
11
tests/bootstrap.php
Normal 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');
|
||||
}
|
||||
Reference in New Issue
Block a user