Commit 8f5916b0 authored by mabolek's avatar mabolek
Browse files

[BUGFIX] Inserted correct test code into testAction()

parent 2efe3c0d
Pipeline #6132 failed with stages
in 15 seconds
......@@ -2,6 +2,10 @@
namespace T3o\Karma\Controller;
use T3o\Karma\Utility\UserProfileChangeKarmaIssuer;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
/***************************************************************
* Copyright notice
*
......@@ -32,14 +36,13 @@ class ManagerController extends AbstractController
*/
public function testAction()
{
$frontendUser = $this->frontendUserRepository->findByUid(1);
$karmaSource = $this->karmaSourceRepository->findByUid(1);
$this->karmaService->addKarmaToUser(12, $frontendUser, $karmaSource);
$frontendUser = $this->frontendUserRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']);
$valueReturned = $this->karmaService->getImmutableKarmaForUser($frontendUser, true, true);
/** @var ObjectManager $objectManager */
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
/** @var UserProfileChangeKarmaIssuer $testUserProfileChangeKarmaIssuerSlot */
$testUserProfileChangeKarmaIssuerSlot = $objectManager->get(UserProfileChangeKarmaIssuer::class);
var_dump($valueReturned);
$testUserProfileChangeKarmaIssuerSlot->newUserWasCreated($frontendUser);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment