Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
IntrospectionQueryTest Class Reference
Inheritance diagram for IntrospectionQueryTest:
GraphQlAbstract WebapiAbstract

Public Member Functions

 testIntrospectionQueryWithFieldArgs ()
 
- Public Member Functions inherited from GraphQlAbstract
 graphQlQuery (string $query, array $variables=[], string $operationName='', array $headers=[])
 
- Public Member Functions inherited from WebapiAbstract
 addModelToDelete ($model, $secure=false)
 
 processRestExceptionResult (\Exception $e)
 

Additional Inherited Members

- Static Public Member Functions inherited from WebapiAbstract
static setUpBeforeClass ()
 
static tearDownAfterClass ()
 
static setFixture ($key, $fixture, $tearDown=self::AUTO_TEAR_DOWN_AFTER_METHOD)
 
static getFixture ($key)
 
static callModelDelete ($model, $secure=false)
 
static deleteFixture ($key, $secure=false)
 
- Data Fields inherited from WebapiAbstract
const AUTO_TEAR_DOWN_DISABLED = 0
 
const AUTO_TEAR_DOWN_AFTER_METHOD = 1
 
const AUTO_TEAR_DOWN_AFTER_CLASS = 2
 
const ADAPTER_SOAP = 'soap'
 
const ADAPTER_REST = 'rest'
 
- Protected Member Functions inherited from GraphQlAbstract
 cleanCache ()
 
 assertResponseFields ($actualResponse, $assertionMap)
 
- Protected Member Functions inherited from WebapiAbstract
 tearDown ()
 
 _webApiCall ( $serviceInfo, $arguments=[], $webApiAdapterCode=null, $storeCode=null, $integration=null)
 
 _markTestAsSoapOnly ($message=null)
 
 _markTestAsRestOnly ($message=null)
 
 _getWebApiAdapter ($webApiAdapterCode)
 
 _assertMessagesEqual ($expectedMessages, $receivedMessages)
 
 _cleanAppConfigCache ()
 
 _restoreAppConfig ()
 
 checkSoapFault ( $soapFault, $expectedMessage, $expectedFaultCode, $expectedErrorParams=[], $expectedWrappedErrors=[], $traceString=null)
 
 _checkFaultParams ($expectedErrorParams, $errorDetails)
 
 _checkWrappedErrors ($expectedWrappedErrors, $errorDetails)
 
- Static Protected Member Functions inherited from WebapiAbstract
static _setFixtureNamespace ()
 
static _unsetFixtureNamespace ()
 
static _getFixtureNamespace ()
 
static _deleteFixtures ($fixtures)
 
- Protected Attributes inherited from WebapiAbstract
 $_appCache
 
 $_modelsToDelete = []
 
 $_origConfigValues = []
 
 $_webApiAdapters
 
 $_webApiAdaptersMap
 
- Static Protected Attributes inherited from WebapiAbstract
static $_fixturesNamespace
 
static $_fixtures = []
 
static $_methodLevelFixtures = []
 
static $_classLevelFixtures = []
 

Detailed Description

Definition at line 12 of file IntrospectionQueryTest.php.

Member Function Documentation

◆ testIntrospectionQueryWithFieldArgs()

testIntrospectionQueryWithFieldArgs ( )

Tests that Introspection is disabled when not in developer mode @SuppressWarnings(PHPMD.ExcessiveMethodLength)

Definition at line 18 of file IntrospectionQueryTest.php.

19  {
20  $query
21  = <<<QUERY
22 query IntrospectionQuery {
23  __schema {
24  queryType { name }
25  types{
26  ...FullType
27  }
28  }
29  }
30 fragment FullType on __Type{
31  name
32  kind
33  fields(includeDeprecated:true){
34  name
35  args{
36  ...InputValue
37  }
38  }
39  }
40 
41 fragment TypeRef on __Type {
42  kind
43  name
44  ofType{
45  kind
46  name
47  }
48 }
49 fragment InputValue on __InputValue {
50  name
51  description
52  type { ...TypeRef }
53  defaultValue
54 }
55 QUERY;
56 
57  $this->expectException(\Exception::class);
58  $this->expectExceptionMessage(
59  'GraphQL response contains errors: GraphQL introspection is not allowed, but ' .
60  'the query contained __schema or __type'
61  );
62  $this->graphQlQuery($query);
63  }
taxRateField this edit on("click.mselect-delete", ".mselect-delete", function() { if(!confirm('<?=/*@escapeNotVerified */__( 'Do you really want to delete this tax rate?') ?>')) { return;} var that=$(this), select=that.closest('.mselect-list').prev(), rateValue=that.parent().find( 'input[type="checkbox"]').val();$( 'body').trigger( 'processStart');var ajaxOptions={ type:'POST', data:{ tax_calculation_rate_id:rateValue, form_key:$( 'input[name="form_key"]').val() }, dataType:'json', url:'<?=/*@escapeNotVerified */$block->getTaxRateDeleteUrl() ?>', success:function(result, status) { $( 'body').trigger( 'processStop');if(result.success) { that.parent().remove();select.find( 'option').each(function() { if(this.value===rateValue) { $(this).remove();} });select.trigger( 'change.hiddenSelect');} else { if(result.error_message) alert({ content:result.error_message });else alert({ content:'<?=/*@escapeNotVerified */__( 'An error occurred') ?>' });} }, error:function() { $( 'body').trigger( 'processStop');alert({ content:'<?=/*@escapeNotVerified */__( 'An error occurred') ?>' });} };$.ajax(ajaxOptions);}) .on( 'click.mselectAdd'
Definition: edit.phtml:164
graphQlQuery(string $query, array $variables=[], string $operationName='', array $headers=[])

The documentation for this class was generated from the following file: