assertNull(self::fetchState("foobar")); } /** * @test * @dataProvider provideValues */ public function fetchesStoredValue($value) { // emulate we're in an event loop… self::$registry = []; $this->assertNull(self::fetchState("foobar")); self::storeState("foobar", $value); $this->assertSame($value, self::fetchState("foobar")); } public function provideValues() { return [ ["string"], [42], [1.001], [true], [false], [null], [new \StdClass], ]; } }