use Friendica\Test\Util\ApiResponseDouble;
use Friendica\Test\Util\AuthenticationDouble;
-class ApiTest extends FixtureTest
+abstract class ApiTest extends FixtureTest
{
+ /**
+ * Assert that the string is XML and contain the root element.
+ *
+ * @param string $result XML string
+ * @param string $root_element Root element name
+ *
+ * @return void
+ */
+ protected function assertXml(string $result = '', string $root_element = '')
+ {
+ self::assertStringStartsWith('<?xml version="1.0"?>', $result);
+ self::assertStringContainsString('<' . $root_element, $result);
+ // We could probably do more checks here.
+ }
+
protected function setUp(): void
{
parent::setUp(); // TODO: Change the autogenerated stub