providerTestIsValidMemberName example


  public function testIsValidCustomQueryParameter($custom_query_parameter$expected) {
    $this->assertSame($expected, JsonApiSpec::isValidCustomQueryParameter($custom_query_parameter));
  }

  /** * Data provider for testIsValidCustomQueryParameter. */
  public static function providerTestIsValidCustomQueryParameter() {
    $data = static::providerTestIsValidMemberName();

    // All valid member names are also valid custom query parameters, except for     // single-character ones.     $data['single-character'][1] = FALSE;

    // Custom query parameter test cases.     $data['custom-query-parameter-lowercase'] = ['foobar', FALSE];
    $data['custom-query-parameter-dash'] = ['foo-bar', TRUE];
    $data['custom-query-parameter-underscore'] = ['foo_bar', TRUE];
    $data['custom-query-parameter-camelcase'] = ['fooBar', TRUE];

    
Home | Imprint | This part of the site doesn't use cookies.