Repository: flutter/flutter
File: packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart (Dart)

Code before:
        buildSystem: TestBuildSystem.all(BuildResult(success: true)),
        logger: logger,
        fileSystem: fileSystem,
        osUtils: FakeOperatingSystemUtils(),
      );
      fakeProcessManager.addCommands(<FakeCommand>[
        xattrCommand,
        setUpFakeXcodeBuildHandler(),
        exportArchiveCommand(exportOptionsPlist: _exportOptionsPlist),
      ]);
      createMinimalMockProjectFiles();
      await createTestCommandRunner(
        command,
      ).run(const <String>['build', 'ipa', '--export-method', 'ad-hoc', '--no-pub']);

      expect(logger.statusText, contains('build/ios/archive/Runner.xcarchive'));
      expect(logger.statusText, contains('Building release-testing IPA'));
    },
    overrides: <Type, Generator>{
      FileSystem: () => fileSystem,
      Logger: () => logger,
      ProcessManager: () => fakeProcessManager,
      Pub: ThrowingPub.new,
      Platform: () => macosPlatform,
      XcodeProjectInterpreter: () =>
          FakeXcodeProjectInterpreterWithBuildSettings(version: Version(16, null, null)),
      Artifacts: () => Artifacts.test(),
    },
  );

  testUsingContext(
    'ipa build uses "debugging" export method for development distribution',
    () async {
      final File cachedExportOptionsPlist = fileSystem.file('/CachedExportOptions.plist');
      final command = BuildCommand(
        androidSdk: FakeAndroidSdk(),
        buildSystem: TestBuildSystem.all(BuildResult(success: true)),
        logger: logger,
        fileSystem: fileSystem,
        osUtils: FakeOperatingSystemUtils(),
      );
      fakeProcessManager.addCommands(<FakeCommand>[
        xattrCommand,
        setUpFakeXcodeBuildHandler(),
        exportArchiveCommand(
          exportOptionsPlist: _exportOptionsPlist,
          cachePlist: cachedExportOptionsPlist,
        ),
      ]);
      createMinimalMockProjectFiles();
      await createTestCommandRunner(

Review comment (suggestion):
```suggestion
          XcodeProjectInterpreter: () => FakeXcodeProjectInterpreterWithBuildSettings(),
```

Looks like this test is specifically ensuring the passed in `--export-method` is used. The opposite is already tested in `ipa build uses new "release-testing" export method for ad-hoc distribution`.


Code after:
        buildSystem: TestBuildSystem.all(BuildResult(success: true)),
        logger: logger,
        fileSystem: fileSystem,
        osUtils: FakeOperatingSystemUtils(),
      );
      fakeProcessManager.addCommands(<FakeCommand>[
        xattrCommand,
        setUpFakeXcodeBuildHandler(),
        exportArchiveCommand(exportOptionsPlist: _exportOptionsPlist),
      ]);
      createMinimalMockProjectFiles();
      await createTestCommandRunner(
        command,
      ).run(const <String>['build', 'ipa', '--export-method', 'ad-hoc', '--no-pub']);

      expect(logger.statusText, contains('build/ios/archive/Runner.xcarchive'));
      expect(logger.statusText, contains('Building ad-hoc IPA'));
    },
    overrides: <Type, Generator>{
      FileSystem: () => fileSystem,
      Logger: () => logger,
      ProcessManager: () => fakeProcessManager,
      Pub: ThrowingPub.new,
      Platform: () => macosPlatform,
      XcodeProjectInterpreter: () => FakeXcodeProjectInterpreterWithBuildSettings(),
      Artifacts: () => Artifacts.test(),
    },
  );

  testUsingContext(
    'ipa build uses "debugging" export method for development distribution',
    () async {
      final File cachedExportOptionsPlist = fileSystem.file('/CachedExportOptions.plist');
      final command = BuildCommand(
        androidSdk: FakeAndroidSdk(),
        buildSystem: TestBuildSystem.all(BuildResult(success: true)),
        logger: logger,
        fileSystem: fileSystem,
        osUtils: FakeOperatingSystemUtils(),
      );
      fakeProcessManager.addCommands(<FakeCommand>[
        xattrCommand,
        setUpFakeXcodeBuildHandler(),
        exportArchiveCommand(
          exportOptionsPlist: _exportOptionsPlist,
          cachePlist: cachedExportOptionsPlist,
        ),
      ]);
      createMinimalMockProjectFiles();
      await createTestCommandRunner(
        command,