knowledge-8.x-1.x-dev/tests/src/Functional/Rest/KnowledgeXmlAnonTest.php
tests/src/Functional/Rest/KnowledgeXmlAnonTest.php
<?php
namespace Drupal\Tests\knowledge\Functional\Rest;
use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
/**
* Tests XML without authentication.
*
* @group rest
*/
class KnowledgeXmlAnonTest extends KnowledgeResourceTestBase {
use AnonResourceTestTrait;
use XmlEntityNormalizationQuirksTrait;
/**
* {@inheritdoc}
*/
protected static $format = 'xml';
/**
* {@inheritdoc}
*/
protected static $mimeType = 'text/xml; charset=UTF-8';
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*
* Anonymous users cannot edit their own knowledge.
*
* @see \Drupal\knowledge\KnowledgeAccessControlHandler::checkAccess
*
* Therefore we grant them the 'administer knowledge' permission for the
* purpose of this test.
*
* @see ::setUpAuthorization
*/
protected static $patchProtectedFieldNames = [
'entity_id',
'changed',
'thread',
'entity_type',
'field_name',
];
/**
* {@inheritdoc}
*/
public function testPostDxWithoutCriticalBaseFields() {
// Deserialization of the XML format is not supported.
$this->markTestSkipped();
}
/**
* {@inheritdoc}
*/
public function testPostSkipKnowledgeApproval() {
// Deserialization of the XML format is not supported.
$this->markTestSkipped();
}
}
