assertEquals($prev, $e->getPrevious()); $this->assertEquals(-1, $e->getCode()); $this->assertEquals('The token has expired.', $e->getMessage()); } public function providePrev(): iterable { yield 'with previous exception' => [new Exception('Prev')]; yield 'without previous exception' => [null]; } }