6
0
Fork 0
jiqu-library-server/tests/Feature/ExampleTest.php

30 lines
639 B
PHP

<?php
namespace Tests\Feature;
use App\Models\OrderProfit;
use App\Services\DistributeService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function test_example()
{
$service = new DistributeService();
try {
DB::beginTransaction();
$service->wechatTransfers(OrderProfit::whereIn('id', [1, 5])->get());
DB::commit();
} catch (\Exception $e) {
DB::rollBack();
}
}
}