Skip to content

Commit

Permalink
[TASK] Replace deprecated code found by extension scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschaufi committed Oct 6, 2021
1 parent 79b099e commit 0339662
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Classes/Utility/SpycYAMLParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ private function loadWithSource($Source)
}

while (++$i < $cnt && self::greedilyNeedNextLine($line)) {
$line = rtrim($line, ' ' . PHP_EOL . TAB . CR) . ' ' . ltrim($Source[$i], ' ' . TAB);
$line = rtrim($line, ' ' . PHP_EOL . "\t" . CR) . ' ' . ltrim($Source[$i], ' ' . "\t");
}
$i--;

Expand Down
22 changes: 13 additions & 9 deletions Tests/Functional/Configuration/ConfigurationManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@
use EBT\ExtensionBuilder\Configuration\ExtensionBuilderConfigurationManager;
use EBT\ExtensionBuilder\Tests\BaseFunctionalTest;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Domain\Model\FrontendUser;

class ConfigurationManagerTest extends BaseFunctionalTest
{
/**
* @var ExtensionBuilderConfigurationManager
*/
private $configurationManager;
private ExtensionBuilderConfigurationManager $configurationManager;

protected function setUp(): void
{
Expand All @@ -37,11 +33,19 @@ protected function setUp(): void

/**
* @test
* @throws \TYPO3\CMS\Extbase\Object\Exception
*/
public function getPersistenceTableReturnsCorrectValue(): void
public function getParentClassForValueObject(): void
{
$parentClassForValueObject = $this->configurationManager->getParentClassForValueObject($this->extension);
self::assertSame('\TYPO3\CMS\Extbase\DomainObject\AbstractValueObject', $parentClassForValueObject);
}

/**
* @test
*/
public function getParentClassForEntityObject(): void
{
$tableName = $this->configurationManager->getPersistenceTable(FrontendUser::class);
self::assertSame($tableName, 'fe_users');
$parentClassForValueObject = $this->configurationManager->getParentClassForEntityObject($this->extension);
self::assertSame('\TYPO3\CMS\Extbase\DomainObject\AbstractEntity', $parentClassForValueObject);
}
}

0 comments on commit 0339662

Please sign in to comment.