You are here

public function BasicPathTest::testFactory in AmazonS3 7.2

@covers Drupal\amazons3\Matchable\BasicPath::factory @covers Drupal\amazons3\Matchable\BasicPath::__construct @covers Drupal\amazons3\Matchable\BasicPath::getPath

File

tests/Matchable/BasicPathTest.php, line 18

Class

BasicPathTest
@class BasicPathTest @package Drupal\amazons3Test\Matchable

Namespace

Drupal\amazons3Test\Matchable

Code

public function testFactory() {
  $paths = BasicPath::factory(array(
    '.*',
    '.?',
  ));
  $this
    ->assertTrue(is_array($paths));
  foreach ($paths as $path) {
    $this
      ->assertInstanceOf('Drupal\\amazons3\\Matchable\\BasicPath', $path);
  }
  $this
    ->assertEquals('.*', $paths[0]
    ->getPath());
  $this
    ->assertEquals('.?', $paths[1]
    ->getPath());
}