Browse Source

Merge branch 'testing-trait-usage'

pull/24/head
Nafies Luthfi 7 years ago
parent
commit
7c1b4ecc37
  1. 3
      tests/Feature/AgencyProfileTest.php
  2. 3
      tests/Feature/Api/ApiEventsTest.php
  3. 3
      tests/Feature/Api/ApiManageProjectsTest.php
  4. 3
      tests/Feature/Api/Projects/ReorderJobListTest.php
  5. 3
      tests/Feature/Api/Projects/ReorderTaskListTest.php
  6. 3
      tests/Feature/Auth/ChangePasswordTest.php
  7. 3
      tests/Feature/Auth/LoginTest.php
  8. 3
      tests/Feature/Auth/ResetPasswordTest.php
  9. 3
      tests/Feature/InstallationTest.php
  10. 3
      tests/Feature/Invoices/InvoiceDuplicateTest.php
  11. 3
      tests/Feature/Invoices/InvoiceEntryTest.php
  12. 3
      tests/Feature/Invoices/ManageInvoicesTest.php
  13. 3
      tests/Feature/ManageJobsTest.php
  14. 3
      tests/Feature/ManageProjectsTest.php
  15. 3
      tests/Feature/ManageSubscriptionsTest.php
  16. 3
      tests/Feature/ManageTasksTest.php
  17. 2
      tests/Feature/Partners/ManageCustomersTest.php
  18. 5
      tests/Feature/Partners/ManageVendorsTest.php
  19. 3
      tests/Feature/Payments/ManagePaymentsTest.php
  20. 3
      tests/Feature/Payments/ManageProjectFeesTest.php
  21. 3
      tests/Feature/Payments/PaymentSearchTest.php
  22. 3
      tests/Feature/Projects/JobCommentsTest.php
  23. 3
      tests/Feature/Projects/UploadFilesTest.php
  24. 3
      tests/Feature/References/SiteOptionsTest.php
  25. 3
      tests/Feature/Users/ManageUsersTest.php
  26. 3
      tests/Feature/Users/UserProfileTest.php
  27. 3
      tests/TestCase.php
  28. 3
      tests/Unit/Helpers/AppLogoImageTest.php
  29. 3
      tests/Unit/Helpers/MoneyFormatTest.php
  30. 5
      tests/Unit/Models/CustomerTest.php
  31. 3
      tests/Unit/Models/InvoiceTest.php
  32. 3
      tests/Unit/Models/JobTest.php
  33. 3
      tests/Unit/Models/PaymentTest.php
  34. 3
      tests/Unit/Models/ProjectTest.php
  35. 3
      tests/Unit/Models/SubscriptionTest.php
  36. 3
      tests/Unit/Models/UserTest.php
  37. 2
      tests/Unit/Models/VendorTest.php
  38. 3
      tests/Unit/Policies/CommentPolicyTest.php
  39. 3
      tests/Unit/Policies/CustomerPolicyTest.php
  40. 3
      tests/Unit/Policies/JobPolicyTest.php
  41. 5
      tests/Unit/Policies/PaymentPolicyTest.php
  42. 5
      tests/Unit/Policies/ProjectPolicyTest.php
  43. 5
      tests/Unit/Policies/TaskPolicyTest.php
  44. 2
      tests/Unit/Policies/UserPolicyTest.php
  45. 3
      tests/Unit/Policies/VendorPolicyTest.php
  46. 3
      tests/Unit/Queries/AdminDashboardQueryTest.php
  47. 3
      tests/Unit/Services/SiteOptionTest.php

3
tests/Feature/AgencyProfileTest.php

@ -3,6 +3,7 @@
namespace Tests\Feature\Users; namespace Tests\Feature\Users;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Agency Profile Feature Test. * Agency Profile Feature Test.
@ -11,6 +12,8 @@ use Tests\TestCase;
*/ */
class AgencyProfileTest extends TestCase class AgencyProfileTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_user_can_visit_agency_page() public function admin_user_can_visit_agency_page()
{ {

3
tests/Feature/Api/ApiEventsTest.php

@ -6,6 +6,7 @@ use Tests\TestCase;
use App\Entities\Users\User; use App\Entities\Users\User;
use App\Entities\Users\Event; use App\Entities\Users\Event;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Manage Events API Feature Test. * Manage Events API Feature Test.
@ -14,6 +15,8 @@ use App\Entities\Projects\Project;
*/ */
class ApiEventsTest extends TestCase class ApiEventsTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function it_can_get_all_existing_events() public function it_can_get_all_existing_events()
{ {

3
tests/Feature/Api/ApiManageProjectsTest.php

@ -4,6 +4,7 @@ namespace Tests\Feature\Api;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Manage Projects API Feature Test. * Manage Projects API Feature Test.
@ -12,6 +13,8 @@ use App\Entities\Projects\Project;
*/ */
class ApiManageProjectsTest extends TestCase class ApiManageProjectsTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_get_project_lists() public function user_can_get_project_lists()
{ {

3
tests/Feature/Api/Projects/ReorderJobListTest.php

@ -5,9 +5,12 @@ namespace Tests\Feature\Api\Projects;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Projects\Job; use App\Entities\Projects\Job;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ReorderJobListTest extends TestCase class ReorderJobListTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_can_reorder_job_position() public function admin_can_reorder_job_position()
{ {

3
tests/Feature/Api/Projects/ReorderTaskListTest.php

@ -5,9 +5,12 @@ namespace Tests\Feature\Api\Projects;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Projects\Task; use App\Entities\Projects\Task;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ReorderTaskListTest extends TestCase class ReorderTaskListTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_can_reorder_task_position() public function admin_can_reorder_task_position()
{ {

3
tests/Feature/Auth/ChangePasswordTest.php

@ -3,9 +3,12 @@
namespace Tests\Feature\Auth; namespace Tests\Feature\Auth;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ChangePasswordTest extends TestCase class ChangePasswordTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function member_can_change_password() public function member_can_change_password()
{ {

3
tests/Feature/Auth/LoginTest.php

@ -4,9 +4,12 @@ namespace Tests\Feature\Auth;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Users\User; use App\Entities\Users\User;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class LoginTest extends TestCase class LoginTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_login_and_logout() public function user_can_login_and_logout()
{ {

3
tests/Feature/Auth/ResetPasswordTest.php

@ -5,9 +5,12 @@ namespace Tests\Feature\Auth;
use Notification; use Notification;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Users\User; use App\Entities\Users\User;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ResetPasswordTest extends TestCase class ResetPasswordTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_reset_password_by_their_email() public function user_can_reset_password_by_their_email()
{ {

3
tests/Feature/InstallationTest.php

@ -4,6 +4,7 @@ namespace Tests\Feature;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Users\User; use App\Entities\Users\User;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Installation Feature Test. * Installation Feature Test.
@ -12,6 +13,8 @@ use App\Entities\Users\User;
*/ */
class InstallationTest extends TestCase class InstallationTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_cannot_visit_install_page_if_user_already_exists_in_database() public function user_cannot_visit_install_page_if_user_already_exists_in_database()
{ {

3
tests/Feature/Invoices/InvoiceDuplicateTest.php

@ -4,6 +4,7 @@ namespace Tests\Feature\Invoices;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Invoices\Invoice; use App\Entities\Invoices\Invoice;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use App\Services\InvoiceDrafts\InvoiceDraftCollection; use App\Services\InvoiceDrafts\InvoiceDraftCollection;
/** /**
@ -13,6 +14,8 @@ use App\Services\InvoiceDrafts\InvoiceDraftCollection;
*/ */
class InvoiceDuplicateTest extends TestCase class InvoiceDuplicateTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_create_invoice_draft_by_duplicate_existing_invoice() public function user_can_create_invoice_draft_by_duplicate_existing_invoice()
{ {

3
tests/Feature/Invoices/InvoiceEntryTest.php

@ -7,6 +7,7 @@ use App\Entities\Projects\Project;
use App\Entities\Partners\Customer; use App\Entities\Partners\Customer;
use App\Services\InvoiceDrafts\Item; use App\Services\InvoiceDrafts\Item;
use App\Services\InvoiceDrafts\InvoiceDraft; use App\Services\InvoiceDrafts\InvoiceDraft;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use App\Services\InvoiceDrafts\InvoiceDraftCollection; use App\Services\InvoiceDrafts\InvoiceDraftCollection;
/** /**
@ -16,6 +17,8 @@ use App\Services\InvoiceDrafts\InvoiceDraftCollection;
*/ */
class InvoiceEntryTest extends TestCase class InvoiceEntryTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_visit_invoice_drafts_page() public function user_can_visit_invoice_drafts_page()
{ {

3
tests/Feature/Invoices/ManageInvoicesTest.php

@ -4,6 +4,7 @@ namespace Tests\Feature\Invoices;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Invoices\Invoice; use App\Entities\Invoices\Invoice;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Manage Invoices Feature Test. * Manage Invoices Feature Test.
@ -12,6 +13,8 @@ use App\Entities\Invoices\Invoice;
*/ */
class ManageInvoicesTest extends TestCase class ManageInvoicesTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_browse_invoice_list_page() public function user_can_browse_invoice_list_page()
{ {

3
tests/Feature/ManageJobsTest.php

@ -8,6 +8,7 @@ use App\Entities\Projects\Job;
use App\Entities\Projects\Task; use App\Entities\Projects\Task;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use App\Entities\Partners\Customer; use App\Entities\Partners\Customer;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Manage Project Feature Test. * Manage Project Feature Test.
@ -16,6 +17,8 @@ use App\Entities\Partners\Customer;
*/ */
class ManageJobsTest extends TestCase class ManageJobsTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_can_entry_job() public function admin_can_entry_job()
{ {

3
tests/Feature/ManageProjectsTest.php

@ -8,9 +8,12 @@ use App\Entities\Projects\Task;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use App\Entities\Partners\Customer; use App\Entities\Partners\Customer;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ManageProjectsTest extends TestCase class ManageProjectsTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_can_input_new_project_with_existing_customer() public function admin_can_input_new_project_with_existing_customer()
{ {

3
tests/Feature/ManageSubscriptionsTest.php

@ -6,9 +6,12 @@ use Tests\TestCase;
use App\Entities\Partners\Vendor; use App\Entities\Partners\Vendor;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use App\Entities\Subscriptions\Subscription; use App\Entities\Subscriptions\Subscription;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ManageSubscriptionsTest extends TestCase class ManageSubscriptionsTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_can_entry_subscription() public function admin_can_entry_subscription()
{ {

3
tests/Feature/ManageTasksTest.php

@ -5,9 +5,12 @@ namespace Tests\Feature;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Projects\Job; use App\Entities\Projects\Job;
use App\Entities\Projects\Task; use App\Entities\Projects\Task;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ManageTasksTest extends TestCase class ManageTasksTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_can_entry_task() public function admin_can_entry_task()
{ {

2
tests/Feature/Partners/ManageCustomersTest.php

@ -2,7 +2,7 @@
namespace Tests\Feature; namespace Tests\Feature;
use Tests\TestCase as TestCase;
use Tests\TestCase;
use App\Entities\Partners\Customer; use App\Entities\Partners\Customer;
use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseMigrations;

5
tests/Feature/Partners/ManageVendorsTest.php

@ -2,11 +2,14 @@
namespace Tests\Feature\Partners; namespace Tests\Feature\Partners;
use Tests\TestCase as TestCase;
use Tests\TestCase;
use App\Entities\Partners\Vendor; use App\Entities\Partners\Vendor;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ManageVendorsTest extends TestCase class ManageVendorsTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_see_vendor_list_in_vendor_index_page() public function user_can_see_vendor_list_in_vendor_index_page()
{ {

3
tests/Feature/Payments/ManagePaymentsTest.php

@ -7,6 +7,7 @@ use App\Entities\Partners\Vendor;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use App\Entities\Partners\Customer; use App\Entities\Partners\Customer;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Manage Payments Feature Test. * Manage Payments Feature Test.
@ -15,6 +16,8 @@ use App\Entities\Partners\Customer;
*/ */
class ManagePaymentsTest extends TestCase class ManagePaymentsTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_can_entry_project_an_income_payment() public function admin_can_entry_project_an_income_payment()
{ {

3
tests/Feature/Payments/ManageProjectFeesTest.php

@ -6,9 +6,12 @@ use Tests\TestCase;
use App\Entities\Users\User; use App\Entities\Users\User;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ManageProjectFeesTest extends TestCase class ManageProjectFeesTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_can_entry_project_fee_payment() public function admin_can_entry_project_fee_payment()
{ {

3
tests/Feature/Payments/PaymentSearchTest.php

@ -5,9 +5,12 @@ namespace Tests\Feature\Payments;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class PaymentSearchTest extends TestCase class PaymentSearchTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_find_payment_by_project_name() public function user_can_find_payment_by_project_name()
{ {

3
tests/Feature/Projects/JobCommentsTest.php

@ -5,9 +5,12 @@ namespace Tests\Feature\Projects;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Projects\Job; use App\Entities\Projects\Job;
use App\Entities\Projects\Comment; use App\Entities\Projects\Comment;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class JobCommentsTest extends TestCase class JobCommentsTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_view_job_comments() public function user_can_view_job_comments()
{ {

3
tests/Feature/Projects/UploadFilesTest.php

@ -6,9 +6,12 @@ use Storage;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Http\UploadedFile; use Illuminate\Http\UploadedFile;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class UploadFilesTest extends TestCase class UploadFilesTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_upload_document_to_a_project() public function user_can_upload_document_to_a_project()
{ {

3
tests/Feature/References/SiteOptionsTest.php

@ -3,6 +3,7 @@
namespace Tests\Feature\Users; namespace Tests\Feature\Users;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Site Options Feature Test. * Site Options Feature Test.
@ -11,6 +12,8 @@ use Tests\TestCase;
*/ */
class SiteOptionsTest extends TestCase class SiteOptionsTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_user_can_visit_site_options_page() public function admin_user_can_visit_site_options_page()
{ {

3
tests/Feature/Users/ManageUsersTest.php

@ -4,6 +4,7 @@ namespace Tests\Feature\Users;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Users\User; use App\Entities\Users\User;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Manage Users Feature Test. * Manage Users Feature Test.
@ -12,6 +13,8 @@ use App\Entities\Users\User;
*/ */
class ManageUsersTest extends TestCase class ManageUsersTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_can_see_user_list_from_dashboard_tab() public function user_can_see_user_list_from_dashboard_tab()
{ {

3
tests/Feature/Users/UserProfileTest.php

@ -3,6 +3,7 @@
namespace Tests\Feature\Users; namespace Tests\Feature\Users;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* User Profile Feature Test. * User Profile Feature Test.
@ -11,6 +12,8 @@ use Tests\TestCase;
*/ */
class UserProfileTest extends TestCase class UserProfileTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function a_user_can_visit_their_profile_page() public function a_user_can_visit_their_profile_page()
{ {

3
tests/TestCase.php

@ -3,12 +3,11 @@
namespace Tests; namespace Tests;
use App\Entities\Users\User; use App\Entities\Users\User;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\BrowserKitTesting\TestCase as BaseTestCase; use Laravel\BrowserKitTesting\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase abstract class TestCase extends BaseTestCase
{ {
use CreatesApplication, DatabaseMigrations;
use CreatesApplication;
protected function adminUserSigningIn($userDataOverrides = []) protected function adminUserSigningIn($userDataOverrides = [])
{ {

3
tests/Unit/Helpers/AppLogoImageTest.php

@ -3,9 +3,12 @@
namespace Tests\Unit\Helpers; namespace Tests\Unit\Helpers;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class AppLogoImageTest extends TestCase class AppLogoImageTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function app_logo_path_function_returns_correct_logo_image_path_based_on_agency_logo_path_setting() public function app_logo_path_function_returns_correct_logo_image_path_based_on_agency_logo_path_setting()
{ {

3
tests/Unit/Helpers/MoneyFormatTest.php

@ -3,6 +3,7 @@
namespace Tests\Unit\Helpers; namespace Tests\Unit\Helpers;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Money Format Helper Unit Test. * Money Format Helper Unit Test.
@ -11,6 +12,8 @@ use Tests\TestCase;
*/ */
class MoneyFormatTest extends TestCase class MoneyFormatTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function format_money_returns_string_with_default_money_sign() public function format_money_returns_string_with_default_money_sign()
{ {

5
tests/Unit/Models/CustomerTest.php

@ -2,16 +2,19 @@
namespace Tests\Unit\Models; namespace Tests\Unit\Models;
use Tests\TestCase as TestCase;
use Tests\TestCase;
use App\Entities\Invoices\Invoice; use App\Entities\Invoices\Invoice;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use App\Entities\Partners\Customer; use App\Entities\Partners\Customer;
use App\Entities\Subscriptions\Subscription; use App\Entities\Subscriptions\Subscription;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class CustomerTest extends TestCase class CustomerTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function a_customer_has_many_projects() public function a_customer_has_many_projects()
{ {

3
tests/Unit/Models/InvoiceTest.php

@ -6,6 +6,7 @@ use Tests\TestCase;
use App\Entities\Users\User; use App\Entities\Users\User;
use App\Entities\Invoices\Invoice; use App\Entities\Invoices\Invoice;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Invoice Model Test. * Invoice Model Test.
@ -14,6 +15,8 @@ use App\Entities\Projects\Project;
*/ */
class InvoiceTest extends TestCase class InvoiceTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function it_has_project_relation() public function it_has_project_relation()
{ {

3
tests/Unit/Models/JobTest.php

@ -8,6 +8,7 @@ use App\Entities\Projects\Task;
use App\Entities\Projects\Comment; use App\Entities\Projects\Comment;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Job Model Unit Test. * Job Model Unit Test.
@ -16,6 +17,8 @@ use Illuminate\Support\Collection;
*/ */
class JobTest extends TestCase class JobTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function a_job_has_name_link_method() public function a_job_has_name_link_method()
{ {

3
tests/Unit/Models/PaymentTest.php

@ -7,9 +7,12 @@ use App\Entities\Users\User;
use App\Entities\Partners\Vendor; use App\Entities\Partners\Vendor;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use App\Entities\Partners\Customer; use App\Entities\Partners\Customer;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class PaymentTest extends TestCase class PaymentTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function it_can_have_partner_relation_on_customer_model_for_income_payment() public function it_can_have_partner_relation_on_customer_model_for_income_payment()
{ {

3
tests/Unit/Models/ProjectTest.php

@ -11,9 +11,12 @@ use App\Entities\Projects\Project;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use App\Entities\Partners\Customer; use App\Entities\Partners\Customer;
use App\Entities\Subscriptions\Subscription; use App\Entities\Subscriptions\Subscription;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ProjectTest extends TestCase class ProjectTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function a_project_has_name_link_method() public function a_project_has_name_link_method()
{ {

3
tests/Unit/Models/SubscriptionTest.php

@ -9,9 +9,12 @@ use App\Entities\Projects\Project;
use App\Entities\Partners\Customer; use App\Entities\Partners\Customer;
use App\Entities\Subscriptions\Type; use App\Entities\Subscriptions\Type;
use App\Entities\Subscriptions\Subscription; use App\Entities\Subscriptions\Subscription;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class SubscriptionTest extends TestCase class SubscriptionTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function it_has_name_link_method() public function it_has_name_link_method()
{ {

3
tests/Unit/Models/UserTest.php

@ -8,6 +8,7 @@ use App\Entities\Projects\Job;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* User Model Unit Test. * User Model Unit Test.
@ -16,6 +17,8 @@ use Illuminate\Support\Collection;
*/ */
class UserTest extends TestCase class UserTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function user_has_name_link_method() public function user_has_name_link_method()
{ {

2
tests/Unit/Models/VendorTest.php

@ -2,7 +2,7 @@
namespace Tests\Unit\Models; namespace Tests\Unit\Models;
use Tests\TestCase as TestCase;
use Tests\TestCase;
use App\Entities\Partners\Vendor; use App\Entities\Partners\Vendor;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;

3
tests/Unit/Policies/CommentPolicyTest.php

@ -4,9 +4,12 @@ namespace Tests\Unit\Policies;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Projects\Comment; use App\Entities\Projects\Comment;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class CommentPolicyTest extends TestCase class CommentPolicyTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function admin_can_edit_any_comments() public function admin_can_edit_any_comments()
{ {

3
tests/Unit/Policies/CustomerPolicyTest.php

@ -4,6 +4,7 @@ namespace Tests\Unit\Policies;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Partners\Customer; use App\Entities\Partners\Customer;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Customer Policy Test. * Customer Policy Test.
@ -12,6 +13,8 @@ use App\Entities\Partners\Customer;
*/ */
class CustomerPolicyTest extends TestCase class CustomerPolicyTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function only_admin_can_create_customer() public function only_admin_can_create_customer()
{ {

3
tests/Unit/Policies/JobPolicyTest.php

@ -4,9 +4,12 @@ namespace Tests\Unit\Policies;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Projects\Job; use App\Entities\Projects\Job;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class JobPolicyTest extends TestCase class JobPolicyTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function an_admin_can_create_job_on_a_project() public function an_admin_can_create_job_on_a_project()
{ {

5
tests/Unit/Policies/PaymentPolicyTest.php

@ -2,8 +2,9 @@
namespace Tests\Unit\Policies; namespace Tests\Unit\Policies;
use Tests\TestCase as TestCase;
use Tests\TestCase;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Payment Policy Test. * Payment Policy Test.
@ -12,6 +13,8 @@ use App\Entities\Payments\Payment;
*/ */
class PaymentPolicyTest extends TestCase class PaymentPolicyTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function only_admin_can_create_payment() public function only_admin_can_create_payment()
{ {

5
tests/Unit/Policies/ProjectPolicyTest.php

@ -2,12 +2,15 @@
namespace Tests\Unit\Policies; namespace Tests\Unit\Policies;
use Tests\TestCase;
use App\Entities\Projects\Job; use App\Entities\Projects\Job;
use Tests\TestCase as TestCase;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class ProjectPolicyTest extends TestCase class ProjectPolicyTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function only_admin_can_create_project() public function only_admin_can_create_project()
{ {

5
tests/Unit/Policies/TaskPolicyTest.php

@ -2,12 +2,15 @@
namespace Tests\Unit\Policies; namespace Tests\Unit\Policies;
use Tests\TestCase;
use App\Entities\Projects\Job; use App\Entities\Projects\Job;
use App\Entities\Projects\Task; use App\Entities\Projects\Task;
use Tests\TestCase as TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class TaskPolicyTest extends TestCase class TaskPolicyTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function only_admin_can_create_task_on_a_job() public function only_admin_can_create_task_on_a_job()
{ {

2
tests/Unit/Policies/UserPolicyTest.php

@ -2,9 +2,9 @@
namespace Tests\Unit\Policies; namespace Tests\Unit\Policies;
use Tests\TestCase;
use App\Entities\Users\User; use App\Entities\Users\User;
use App\Entities\Projects\Job; use App\Entities\Projects\Job;
use Tests\TestCase as TestCase;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseMigrations;

3
tests/Unit/Policies/VendorPolicyTest.php

@ -5,6 +5,7 @@ namespace Tests\Unit\Policies;
use Tests\TestCase; use Tests\TestCase;
use App\Entities\Partners\Vendor; use App\Entities\Partners\Vendor;
use App\Entities\Payments\Payment; use App\Entities\Payments\Payment;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/** /**
* Vendor Policy Test. * Vendor Policy Test.
@ -13,6 +14,8 @@ use App\Entities\Payments\Payment;
*/ */
class VendorPolicyTest extends TestCase class VendorPolicyTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function only_admin_can_create_vendor() public function only_admin_can_create_vendor()
{ {

3
tests/Unit/Queries/AdminDashboardQueryTest.php

@ -10,9 +10,12 @@ use App\Entities\Payments\Payment;
use App\Entities\Projects\Project; use App\Entities\Projects\Project;
use App\Queries\AdminDashboardQuery; use App\Queries\AdminDashboardQuery;
use App\Entities\Subscriptions\Subscription; use App\Entities\Subscriptions\Subscription;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class AdminDashboardQueryTest extends TestCase class AdminDashboardQueryTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function retrieve_total_earnings_on_the_year() public function retrieve_total_earnings_on_the_year()
{ {

3
tests/Unit/Services/SiteOptionTest.php

@ -4,9 +4,12 @@ namespace Tests\Unit\Services;
use Option; use Option;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class SiteOptionTest extends TestCase class SiteOptionTest extends TestCase
{ {
use DatabaseMigrations;
/** @test */ /** @test */
public function option_can_be_set() public function option_can_be_set()
{ {

Loading…
Cancel
Save