2 namespace TYPO3\CMS\Install\Tests\Unit\Updates;
17 use Prophecy\Argument;
18 use Prophecy\Prophecy\ObjectProphecy;
20 use TYPO3\CMS\Core\Tests\Unit\Resource\BaseTestCase;
46 unset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'INSTALL'][
'wizardDone']);
47 $this->packageManagerProphecy = $this->prophesize(\TYPO3\CMS\Core\Package\PackageManager::class);
48 $this->dbProphecy = $this->prophesize(\TYPO3\CMS\Core\Database\DatabaseConnection::class);
49 $GLOBALS[
'TYPO3_DB'] = $this->dbProphecy->reveal();
50 $this->updateWizard =
new UpdateWizard();
65 $this->packageManagerProphecy->isPackageActive(
'css_styled_content')->willReturn(
true);
66 $this->dbProphecy->exec_SELECTcountRows(Argument::cetera())->willReturn(0);
69 $this->assertFalse($this->updateWizard->checkForUpdate($description));
78 $this->packageManagerProphecy->isPackageActive(
'css_styled_content')->willReturn(
true);
79 $this->dbProphecy->exec_SELECTcountRows(Argument::cetera())->willReturn(1);
82 $this->assertFalse($this->updateWizard->checkForUpdate($description));
91 $this->packageManagerProphecy->isPackageActive(
'css_styled_content')->willReturn(
false);
92 $this->dbProphecy->exec_SELECTcountRows(Argument::cetera())->willReturn(1);
95 $this->assertTrue($this->updateWizard->checkForUpdate($description));