/** * @return void */ public function testNestedCapturesThrowsException() { $this->container[] = 'foo'; $caught = false; try { $this->container->captureStart('SET'); $this->container->captureStart('SET'); $this->container->captureEnd(); $this->container->captureEnd(); } catch (Exception $e) { $this->container->captureEnd(); $caught = true; } $this->assertTrue($caught, 'Nested captures should throw exceptions'); }