コード例 #1
0
 /**
  * @test
  * @covers Cocur\Plum\Filter\FileExtensionFilter::__construct()
  * @covers Cocur\Plum\Filter\FileExtensionFilter::filter()
  */
 public function convertShouldReturnFalseIfFileExtensionInArrayNotMatches()
 {
     $converter = new FileExtensionFilter('md', '[filename]');
     $this->assertFalse($converter->filter(['filename' => 'test.txt']));
 }
コード例 #2
0
 /**
  * @test
  * @covers Plum\PlumFile\FileExtensionFilter::__construct()
  * @covers Plum\PlumFile\FileExtensionFilter::filter()
  */
 public function convertShouldReturnFalseIfFileExtensionNotMatchesInArray()
 {
     $converter = new FileExtensionFilter(['md', 'html']);
     $this->assertFalse($converter->filter('test.txt'));
 }