/**
  * Issue #9: File manifest: fileset is not supported
  */
 public function testAddFileset()
 {
     $this->manifest->setAuthor('Test')->setCreationDate('August 2014')->setCopyright('2014', 'Test', false);
     $section = new \GreenCape\Manifest\FilesetSection();
     $files = new \GreenCape\Manifest\FileSection();
     $files->setBase('dir')->addFile('foo.txt');
     $section->addFileset($files);
     $this->manifest->addSection('fileset', $section);
     $expected = '<?xml version="1.0" encoding="UTF-8"?>';
     $expected .= '<extension method="install" type="file" version="2.5">';
     $expected .= '<author>Test</author>';
     $expected .= '<creationDate>August 2014</creationDate>';
     $expected .= '<copyright>(C) 2014 Test. All rights reserved.</copyright>';
     $expected .= '<license>GNU General Public License version 2 or later; see LICENSE.txt</license>';
     $expected .= '<fileset>';
     $expected .= '<files folder="dir">';
     $expected .= '<file>foo.txt</file>';
     $expected .= '</files>';
     $expected .= '</fileset>';
     $expected .= '</extension>';
     $this->assertXmlStringEqualsXmlString($expected, (string) $this->manifest);
 }
Esempio n. 2
0
 public function testCreationDateTriggersCopyrightYearRange()
 {
     $this->manifest->setAuthor('Sean Connery');
     $this->manifest->setCreationDate('02.08.2010');
     $this->assertRegExp('~\\(C\\) 2010 - \\d+ Sean Connery\\. All rights reserved\\.~', $this->manifest->getCopyright());
 }