Bottelet / DaybydayCRM

DaybydayCRM an open-source CRM, to help you keep track of your daily workflow.
https://daybydaycrm.com
2.24k stars 752 forks source link

Namespaces are not correct in test cases #234

Closed mgrWetales closed 3 years ago

mgrWetales commented 3 years ago

while running composer update getting following psr-4 warnings:

Class Tests\Unit\User\TaskObserverDeleteTest located in ./tests/Unit/Task/TaskObserverDeleteTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Unit\User\LeadObserverDeleteTest located in ./tests/Unit/Lead/LeadObserverDeleteTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Unit\Deadline\GetDateFormatTest located in ./tests/Unit/Format/GetDateFormatTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Unit\User\ProjectObserverDeleteTest located in ./tests/Unit/Project/ProjectObserverDeleteTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Unit\Invoice\PaymentSourceEnumTest located in ./tests/Unit/Payment/PaymentSourceEnumTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Unit\Controllers\Client\AppointmentsControllerTest located in ./tests/Unit/Controllers/Appointment/AppointmentsControllerTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Unit\Controllers\Project\PaymentsControllerTest located in ./tests/Unit/Controllers/Payment/PaymentsControllerTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Unit\Controllers\Project\PaymentsControllerAddPaymentTest located in ./tests/Unit/Controllers/Payment/PaymentsControllerAddPaymentTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Unit\Controllers\DemoEnvironment\CanNotAccessTest located in ./tests/Unit/DemoEnvironment/CanNotAccessTest.php does not comply with psr-4 autoloading standard. Skipping.

Resolved these by updating proper namespaces in all these files:

tests/Unit/Controllers/Appointment/AppointmentsControllerTest.php tests/Unit/Controllers/Payment/PaymentsControllerAddPaymentTest.php tests/Unit/Controllers/Payment/PaymentsControllerTest.php tests/Unit/DemoEnvironment/CanNotAccessTest.php tests/Unit/Format/GetDateFormatTest.php tests/Unit/Lead/LeadObserverDeleteTest.php tests/Unit/Payment/PaymentSourceEnumTest.php tests/Unit/Project/ProjectObserverDeleteTest.php tests/Unit/Task/TaskObserverDeleteTest.php

Bottelet commented 3 years ago

Thanks fixed now: https://github.com/Bottelet/DaybydayCRM/commit/830b3c52475441ea9dd619ac7630722299293cad

When copy-paste goes to fast :)

Thank you @mgrWetales, for pointing it out for me!