getValue()] = 'foo'; $this->assertEquals( 'foo', $environnement->get(EnvironnementVarEnum::APP_ENV()->getValue()) ); } public function testGetInvalid(): void { $environnement = new Environnement(); $this->expectException(RuntimeException::class); $this->expectExceptionMessage('Undefined environment variable : invalid'); $environnement->get('invalid'); } }