diff --git a/phpunit.xml b/phpunit.xml index 1cbc5be..aa668c7 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,29 +1,23 @@ - - - - src - - - - - - - - - - tests - - - - - + + + + + + + + + + + tests + + + + + + + + src + + diff --git a/phpunit.xml.bak b/phpunit.xml.bak new file mode 100644 index 0000000..1cbc5be --- /dev/null +++ b/phpunit.xml.bak @@ -0,0 +1,29 @@ + + + + + src + + + + + + + + + + tests + + + + + + diff --git a/src/FeatureGroups/DefaultFeatureGroup.php b/src/FeatureGroups/DefaultFeatureGroup.php index 1a57d2c..c6ac4b8 100644 --- a/src/FeatureGroups/DefaultFeatureGroup.php +++ b/src/FeatureGroups/DefaultFeatureGroup.php @@ -1152,7 +1152,7 @@ public function browserSupportUrl(): string Directive::XR_SPATIAL_TRACKING, Directive::XR, Directive::VR => new class extends Directive { public function name(): string { - return 'vr'; + return Directive::XR_SPATIAL_TRACKING; } public function specificationName(): string diff --git a/tests/DirectiveTest.php b/tests/DirectiveTest.php index 8b23911..42fc421 100644 --- a/tests/DirectiveTest.php +++ b/tests/DirectiveTest.php @@ -36,4 +36,11 @@ public function it_can_add_an_rule(): void $this->assertCount(1, $directive->rules()); $this->assertSame(Value::SELF, $directive->rules()[0]); } + + #[Test] + public function xr_spatial_tracking_adds_the_correct_header_directive_instead_of_the_deprecated_one(): void + { + $directive = Directive::make(Directive::XR_SPATIAL_TRACKING); + $this->assertSame(Directive::XR_SPATIAL_TRACKING, $directive->name()); + } }