isProtected() public method

Tells if this package is protected and therefore cannot be deactivated or deleted
public isProtected ( ) : boolean
return boolean
コード例 #1
0
 /**
  * @test
  */
 public function aPackageCanBeFlaggedAsProtected()
 {
     $packagePath = 'vfs://Packages/Application/Vendor/Dummy/';
     mkdir($packagePath, 0700, true);
     file_put_contents($packagePath . 'composer.json', '{"name": "vendor/dummy", "type": "flow-test"}');
     $package = new Package('Vendor.Dummy', 'vendor/dummy', $packagePath);
     $this->assertFalse($package->isProtected());
     $package->setProtected(true);
     $this->assertTrue($package->isProtected());
 }