示例#1
0
<?php

/*readfile($_GET["file"]);
	exit;*/
//symlink("../testsite/install.php", "cb_backend/install.php");
echo readLink("cb_backend/install.php");
 public function testCurrentSymlinksAreUnlinked()
 {
     $this->createRootPackage();
     $package = $this->createStaticPackage('some/static', 'package/theme', array(), true, false, true);
     $this->localRepository->addPackage($package);
     $packageLocation = $this->projectRoot . "/vendor/" . $package->getName();
     mkdir($packageLocation . '/assets/testdir');
     mkdir("{$this->projectRoot}/htdocs/app/design/frontend/Package/theme/web/images/", 0777, true);
     symlink($packageLocation . '/assets/testdir', "{$this->projectRoot}/htdocs/app/design/frontend/Package/theme/web/images/catalog");
     $this->assertFileExists("{$this->projectRoot}/htdocs/app/design/frontend/Package/theme/web/images/catalog");
     $this->assertTrue(is_link("{$this->projectRoot}/htdocs/app/design/frontend/Package/theme/web/images/catalog"));
     $this->assertEquals($packageLocation . '/assets/testdir', readLink("{$this->projectRoot}/htdocs/app/design/frontend/Package/theme/web/images/catalog"));
     $event = new Event('event', $this->composer, $this->io);
     $this->activatePlugin();
     $this->plugin->symlinkStatics($event);
     $this->assertFileExists("{$this->projectRoot}/htdocs/app/design/frontend/Package/theme/web/images/catalog");
     $this->assertTrue(is_link("{$this->projectRoot}/htdocs/app/design/frontend/Package/theme/web/images/catalog"));
 }