public function PresignedPathTest::testFactory in AmazonS3 7.2
@covers Drupal\amazons3\Matchable\PresignedPath::factory
File
- tests/
Matchable/ PresignedPathTest.php, line 16
Class
- PresignedPathTest
- @class PresignedPathTest @package Drupal\amazons3Test\Matchable
Namespace
Drupal\amazons3Test\MatchableCode
public function testFactory() {
$paths = PresignedPath::factory(array(
'.*' => 30,
'.?' => 60,
));
$this
->assertTrue(is_array($paths));
foreach ($paths as $path) {
$this
->assertInstanceOf('Drupal\\amazons3\\Matchable\\PresignedPath', $path);
}
$this
->assertEquals('.*', $paths[0]
->getPath());
$this
->assertEquals(30, $paths[0]
->getTimeout());
$this
->assertEquals('.?', $paths[1]
->getPath());
$this
->assertEquals('60', $paths[1]
->getTimeout());
}