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

Code before:
        <false/>
    </dict>
</plist>
''';

      final String actualIpaPlistContents = fileSystem
          .file(cachedExportOptionsPlist)
          .readAsStringSync();

      expect(actualIpaPlistContents, expectedIpaPlistContents);
      expect(logger.statusText, contains('Building debugging 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 new "release-testing" export method for app-store 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,
      ).run(const <String>['build', 'ipa', '--export-method', 'ad-hoc', '--no-pub']);

      const expectedIpaPlistContents = '''
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

Review comment (suggestion):
```suggestion
    'ipa build uses new "release-testing" export method for ad-hoc distribution',
```

Code after:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>method</key>
        <string>debugging</string>
        <key>uploadBitcode</key>
        <false/>
    </dict>
</plist>
''';

      final String actualIpaPlistContents = fileSystem
          .file(cachedExportOptionsPlist)
          .readAsStringSync();

      expect(actualIpaPlistContents, expectedIpaPlistContents);
      expect(logger.statusText, contains('Building debugging 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 new "release-testing" export method for ad-hoc 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();