service = app('NewOrderCountingRecordService'); // $this->data['newOrderCountingRecords'] // = factory(OrderCountingRecord::class, $this->amount) // ->create(); } public function testReturned() { $this->assertTrue(true); } function tearDown(): void { OrderCountingRecord::query() ->whereIn('id', data_get($this->data['newOrderCountingRecords'], '*.id') ?? []) ->delete(); parent::tearDown(); } /** * @test */ // public function get_test() // { // $start = '2021-05-01'; // $startDate = $start; // $endDate = \Carbon\Carbon::parse($start)->endOfMonth()->toDateString(); // $this->service->recordByMonth($start); // $this->assertEquals(OrderCountingRecord::query() // ->whereBetween('date_target', [$startDate, $endDate]) // ->where('counting_unit','日') // ->sum('amount'), OrderCountingRecord::query() // ->where('counting_unit','月') // ->where('month','2021-5') // ->sum('amount')); // $this->assertTrue(true); // } }