public function testBuildFromDirectory() { mkdir('test/sub', 0755, true); touch('test/sub.txt'); file_put_contents('test/sub/test.php', '<?php echo "Hello, @name@!\\n";'); $this->crate->setValues(array('@name@' => 'world')); $this->crate->buildFromDirectory($this->cwd, '/\\.php$/'); $this->assertFalse(isset($this->phar['test/sub.txt'])); $this->assertEquals('<?php echo "Hello, world!\\n";', file_get_contents('phar://test.phar/test/sub/test.php')); }