+ /**
+ * Create a builder for end-to-end testing on the live environment.
+ *
+ * @return \Civi\Test\CiviEnvBuilder
+ *
+ * @code
+ * \Civi\Test::e2e()->apply();
+ * \Civi\Test::e2e()->install('foo.bar')->apply();
+ * @endCode
+ */
+ public static function e2e() {
+ $builder = new \Civi\Test\CiviEnvBuilder('CiviEnvBuilder');
+ $builder
+ ->callback(function ($ctx) {
+ if (CIVICRM_UF === 'UnitTests') {
+ throw new \RuntimeException("\\Civi\\Test::e2e() requires a real CMS. Found CIVICRM_UF=UnitTests.");
+ }
+ }, 'e2e-check');
+ return $builder;
+ }
+