class PresignedPathTest in AmazonS3 7.2
@class PresignedPathTest @package Drupal\amazons3Test\Matchable
Hierarchy
- class \Drupal\amazons3Test\Matchable\PresignedPathTest extends \Drupal\amazons3Test\Matchable\PHPUnit_Framework_TestCase
Expanded class hierarchy of PresignedPathTest
File
- tests/
Matchable/ PresignedPathTest.php, line 11
Namespace
Drupal\amazons3Test\MatchableView source
class PresignedPathTest extends \PHPUnit_Framework_TestCase {
/**
* @covers Drupal\amazons3\Matchable\PresignedPath::factory
*/
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());
}
/**
* Test getters and setters on PresignedPaths.
*
* @covers Drupal\amazons3\Matchable\PresignedPath::__construct
* @covers Drupal\amazons3\Matchable\PresignedPath::getPath
* @covers Drupal\amazons3\Matchable\PresignedPath::getTimeout
*/
public function testGetters() {
$p = new PresignedPath('images/.*', 30);
$this
->assertEquals('images/.*', $p
->getPath());
$this
->assertEquals(30, $p
->getTimeout());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PresignedPathTest:: |
public | function | @covers Drupal\amazons3\Matchable\PresignedPath::factory | |
PresignedPathTest:: |
public | function | Test getters and setters on PresignedPaths. |