diff --git a/tests/Test/WebTestCaseTest.php b/tests/Test/WebTestCaseTest.php index d2608c81..9233c0f4 100644 --- a/tests/Test/WebTestCaseTest.php +++ b/tests/Test/WebTestCaseTest.php @@ -65,6 +65,37 @@ public function testMakeClient(): void ); } + public function testSetEnvironment(): void + { + if (method_exists($this, 'expectUserDeprecationMessage')) { + $this->expectUserDeprecationMessage('Setting "environment" property is deprecated, please use static::$env.'); + } else { + $this->markTestSkipped('expectUserDeprecationMessage is not available.'); + } + + $this->environment = 'test'; + } + + public function testIssetEnvironment(): void + { + if (method_exists($this, 'expectUserDeprecationMessage')) { + $this->expectUserDeprecationMessage('Checking "environment" property is deprecated, please use static::$env.'); + } + + self::assertTrue(isset($this->environment)); + } + + public function testGetEnvironment(): void + { + if (method_exists($this, 'expectUserDeprecationMessage')) { + $this->expectUserDeprecationMessage('Getting "environment" property is deprecated, please use static::$env.'); + } + + $this->assertIsString( + $this->environment, + ); + } + public function testGetUrl(): void { $path = $this->getUrl(