A free open source IT asset/license management system
Fixed tests
snipeecbce7012d1e
diff --git a/tests/Feature/Companies/Api/CompanyHierarchyTest.php b/tests/Feature/Companies/Api/CompanyHierarchyTest.phpindex c878332b70..d94317793a 100644--- a/tests/Feature/Companies/Api/CompanyHierarchyTest.php+++ b/tests/Feature/Companies/Api/CompanyHierarchyTest.php@@ -274,7 +274,9 @@ class CompanyHierarchyTest extends TestCase->json();$this->assertEquals($parent->id, $response['parent']['id']);- $this->assertEquals($parent->name, $response['parent']['name']);+ // Transformer emits e($parent->name) — mirror that on the LHS so a+ // faker name containing an apostrophe or other special char round-trips.+ $this->assertEquals(e($parent->name), $response['parent']['name']);}public function test_user_in_parent_company_has_fmcs_access_to_child_company_assets()diff --git a/tests/Unit/Rules/ExternalUrlTest.php b/tests/Unit/Rules/ExternalUrlTest.phpindex 67aac9f83c..c276a3c7d3 100644--- a/tests/Unit/Rules/ExternalUrlTest.php+++ b/tests/Unit/Rules/ExternalUrlTest.php@@ -4,6 +4,7 @@ namespace Tests\Unit\Rules;use App\Rules\ExternalUrl;use Illuminate\Support\Facades\Validator;+use PHPUnit\Framework\Attributes\DataProvider;use Tests\TestCase;class ExternalUrlTest extends TestCase@@ -60,9 +61,7 @@ class ExternalUrlTest extends TestCase];}- /**- * @dataProvider rejectedProvider- */+ #[DataProvider('rejectedProvider')]public function test_rejects_dangerous_or_malformed_urls(string $url){$this->assertFalse($this->passes($url), 'Should have been rejected: '.$url);