public function methodIsExecuted() { $expectedValue = new \stdClass(); $this->assertSame($expectedValue, (new DummySession())->executeAtomically(function () use($expectedValue) { return $expectedValue; })); }