You are here

public function PathTraitTest::dataProvider in Tome 8

Data provider for testJoinPaths.

Return value

array A data array.

File

modules/tome_base/tests/src/Unit/PathTraitTest.php, line 35

Class

PathTraitTest
@coversDefaultClass \Drupal\tome_base\PathTrait @group tome_base

Namespace

Drupal\Tests\tome_base\Unit

Code

public function dataProvider() {
  return [
    [
      [
        'foo',
        'bar',
      ],
      'foo/bar',
    ],
    [
      [
        'foo/',
        '//bar//',
      ],
      'foo/bar',
    ],
    [
      [
        'http://www.foo.com',
        'bar',
      ],
      'http://www.foo.com/bar',
    ],
    [
      [
        'http:///www.foo.com//',
        '//bar/',
      ],
      'http://www.foo.com/bar',
    ],
  ];
}