class MatchablePathsTest in AmazonS3 7.2
Hierarchy
- class \Drupal\amazons3Test\Matchable\MatchablePathsTest extends \Drupal\amazons3Test\Matchable\PHPUnit_Framework_TestCase
Expanded class hierarchy of MatchablePathsTest
File
- tests/
Matchable/ MatchablePathsTest.php, line 8
Namespace
Drupal\amazons3Test\MatchableView source
class MatchablePathsTest extends \PHPUnit_Framework_TestCase {
/**
* @covers Drupal\amazons3\Matchable\MatchablePaths::__construct
* @covers Drupal\amazons3\Matchable\MatchablePaths::__toString
*/
public function testImplode() {
$mp = new MatchablePaths(BasicPath::factory(array(
'.*',
'.?',
)));
$this
->assertEquals('.*|.?', (string) $mp);
}
/**
* @covers Drupal\amazons3\Matchable\MatchablePaths::match
*/
public function testMatch() {
$paths = BasicPath::factory(array(
'foo',
'bar',
));
$mp = new MatchablePaths($paths);
$this
->assertSame($paths[0], $mp
->match('foo'));
$this
->assertSame($paths[1], $mp
->match('bar'));
}
/**
* @covers Drupal\amazons3\Matchable\MatchablePaths::match
*/
public function testNoMatch() {
$paths = BasicPath::factory(array(
'foo',
'bar',
));
$mp = new MatchablePaths($paths);
$this
->assertFalse($mp
->match('no-match'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MatchablePathsTest:: |
public | function | @covers Drupal\amazons3\Matchable\MatchablePaths::__construct @covers Drupal\amazons3\Matchable\MatchablePaths::__toString | |
MatchablePathsTest:: |
public | function | @covers Drupal\amazons3\Matchable\MatchablePaths::match | |
MatchablePathsTest:: |
public | function | @covers Drupal\amazons3\Matchable\MatchablePaths::match |