'Produto Teste', 'price_sale' => 10, 'quantity' => 1, 'visible_franchisee' => true, ]); $validator = Validator::make($request->all(), $request->rules()); $this->assertFalse($validator->fails()); } public function test_service_persists_visible_franchisee_and_select_filter_finds_it(): void { $service = new ProductService(); $service->create([ 'name' => 'Visível pro Franqueado', 'price_sale' => 10, 'quantity' => 1, 'visible_franchisee' => true, ]); $service->create([ 'name' => 'Só Franqueadora', 'price_sale' => 10, 'quantity' => 1, 'visible_franchisee' => false, ]); $visibleForFranchisee = Product::query()->where('visible_franchisee', true)->pluck('name'); $this->assertSame(['Visível pro Franqueado'], $visibleForFranchisee->all()); } }