expectException(MissingMethodArgument::class); $this->expectExceptionCode(1629468609); $this->expectExceptionMessage("Missing argument `foo` of type `{$parameter->type()}`."); (new MethodArguments( new Parameters($parameter), [ 'bar' => 'bar', ] )); } }