/**
  * @covers ::toPot
  */
 public function test_toPot($arg = null, $position = 5, $message = 'Whoops!', $code = 404)
 {
     $subject = new exception($arg, $position, $message, $code);
     $results = $subject->toPot();
     self::assertInstanceOf(P\Pot::class, $results);
     self::assertEquals([$position => $arg], $results->get());
     self::assertSame($message, $results->getMessage());
     self::assertSame($code, $results->getCode());
     self::assertSame($subject, $results->getPrevious());
 }
 /**
  * InvalidArgumentException constructor.
  * @param mixed $argument
  * @param int $position
  * @param string $message
  * @param int $code
  * @param \Exception|null $previous
  */
 public function __construct($argument, $position = 0, $message = '', $code = 0, \Exception $previous = null)
 {
     $this->assertOnce();
     parent::__construct($message, $code, $previous);
     $this->argument = $argument;
     $this->position = $position;
 }