/** * @test */ public function unfreezePackageEmitsPackageStatesUpdatedSignal() { $this->mockApplicationContext->expects($this->atLeastOnce())->method('isDevelopment')->will($this->returnValue(true)); $this->packageManager->createPackage('Some.Package', null, null, null, ['name' => 'some/package', 'type' => 'typo3-flow-package']); $this->packageManager->freezePackage('Some.Package'); $this->mockDispatcher->expects($this->once())->method('dispatch')->with(PackageManager::class, 'packageStatesUpdated'); $this->packageManager->unfreezePackage('Some.Package'); }
/** * @test */ public function unfreezePackageEmitsPackageStatesUpdatedSignal() { $this->mockApplicationContext->expects($this->atLeastOnce())->method('isDevelopment')->will($this->returnValue(TRUE)); $this->packageManager->createPackage('Some.Package'); $this->packageManager->freezePackage('Some.Package'); $this->mockDispatcher->expects($this->once())->method('dispatch')->with('TYPO3\\Flow\\Package\\PackageManager', 'packageStatesUpdated'); $this->packageManager->unfreezePackage('Some.Package'); }
/** * @test */ public function deletePackageRemovesPackageFromAvailableAndActivePackagesAndDeletesThePackageDirectory() { $package = $this->packageManager->createPackage('Acme.YetAnotherTestPackage'); $packagePath = $package->getPackagePath(); $this->assertTrue(is_dir($packagePath . PackageInterface::DIRECTORY_METADATA)); $this->assertTrue($this->packageManager->isPackageActive('Acme.YetAnotherTestPackage')); $this->assertTrue($this->packageManager->isPackageAvailable('Acme.YetAnotherTestPackage')); $this->packageManager->deletePackage('Acme.YetAnotherTestPackage'); $this->assertFalse(is_dir($packagePath . PackageInterface::DIRECTORY_METADATA)); $this->assertFalse($this->packageManager->isPackageActive('Acme.YetAnotherTestPackage')); $this->assertFalse($this->packageManager->isPackageAvailable('Acme.YetAnotherTestPackage')); }
/** * @test * @expectedException \TYPO3\Flow\Package\Exception\PackageKeyAlreadyExistsException */ public function registeringTheSamePackageKeyWithDifferentCaseShouldThrowException() { $this->packageManager->createPackage('doctrine.instantiator'); $this->packageManager->createPackage('doctrine.Instantiator'); }