first commit
This commit is contained in:
commit
e81864e683
2984 files changed
+267797
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace HermannTelser\Zuladungsliste\Controller;
|
||||
|
||||
/***************************************************************
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Hermann Telser <hermann.telser@gmail.com>, Hermann Telser
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
/**
|
||||
* Test case for class HermannTelser\Zuladungsliste\Controller\ExtrasperrungController.
|
||||
*
|
||||
* @author Hermann Telser <hermann.telser@gmail.com>
|
||||
*/
|
||||
class AdministrationController extends \TYPO3\CMS\Core\Tests\UnitTestCase
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
namespace HermannTelser\Zuladungsliste\Controller;
|
||||
|
||||
|
||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||
|
||||
/***************************************************************
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Hermann Telser <hermann.telser@gmail.com>, Hermann Telser
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
/**
|
||||
* Test case for class HermannTelser\Zuladungsliste\Controller\KriterienController.
|
||||
*
|
||||
* @author Hermann Telser <hermann.telser@gmail.com>
|
||||
*/
|
||||
class ArchitektenController extends ActionController
|
||||
{
|
||||
|
||||
/**
|
||||
* @var \HermannTelser\Zuladungsliste\Controller\KriterienController
|
||||
*/
|
||||
protected $subject = NULL;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->subject = $this->getMock('HermannTelser\Zuladungsliste\Controller\KriterienController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
unset($this->subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function listActionFetchesAllKriteriensFromRepositoryAndAssignsThemToView()
|
||||
{
|
||||
$allKriteriens = $this->getMock('TYPO3\CMS\Extbase\Persistence\ObjectStorage', array(), array(), '', FALSE);
|
||||
$kriterienRepository = $this->getMock('HermannTelser\Zuladungsliste\Domain\Repository\KriterienRepository', array('findAll'), array(), '', FALSE);
|
||||
$kriterienRepository->expects($this->once())->method('findAll')->will($this->returnValue($allKriteriens));
|
||||
$this->inject($this->subject, 'kriterienRepository', $kriterienRepository);
|
||||
$view = $this->getMock('TYPO3\CMS\Extbase\Mvc\View\ViewInterface');
|
||||
$view->expects($this->once())->method('assign')->with('kriteriens', $allKriteriens);
|
||||
$this->inject($this->subject, 'view', $view);
|
||||
$this->subject->listAction();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function showActionAssignsTheGivenKriterienToView()
|
||||
{
|
||||
$kriterien = new \HermannTelser\Zuladungsliste\Domain\Model\Kriterien();
|
||||
$view = $this->getMock('TYPO3\CMS\Extbase\Mvc\View\ViewInterface');
|
||||
$this->inject($this->subject, 'view', $view);
|
||||
$view->expects($this->once())->method('assign')->with('kriterien', $kriterien);
|
||||
$this->subject->showAction($kriterien);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function createActionAddsTheGivenKriterienToKriterienRepository()
|
||||
{
|
||||
$kriterien = new \HermannTelser\Zuladungsliste\Domain\Model\Kriterien();
|
||||
$kriterienRepository = $this->getMock('HermannTelser\Zuladungsliste\Domain\Repository\KriterienRepository', array('add'), array(), '', FALSE);
|
||||
$kriterienRepository->expects($this->once())->method('add')->with($kriterien);
|
||||
$this->inject($this->subject, 'kriterienRepository', $kriterienRepository);
|
||||
$this->subject->createAction($kriterien);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function editActionAssignsTheGivenKriterienToView()
|
||||
{
|
||||
$kriterien = new \HermannTelser\Zuladungsliste\Domain\Model\Kriterien();
|
||||
$view = $this->getMock('TYPO3\CMS\Extbase\Mvc\View\ViewInterface');
|
||||
$this->inject($this->subject, 'view', $view);
|
||||
$view->expects($this->once())->method('assign')->with('kriterien', $kriterien);
|
||||
$this->subject->editAction($kriterien);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function updateActionUpdatesTheGivenKriterienInKriterienRepository()
|
||||
{
|
||||
$kriterien = new \HermannTelser\Zuladungsliste\Domain\Model\Kriterien();
|
||||
$kriterienRepository = $this->getMock('HermannTelser\Zuladungsliste\Domain\Repository\KriterienRepository', array('update'), array(), '', FALSE);
|
||||
$kriterienRepository->expects($this->once())->method('update')->with($kriterien);
|
||||
$this->inject($this->subject, 'kriterienRepository', $kriterienRepository);
|
||||
$this->subject->updateAction($kriterien);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function deleteActionRemovesTheGivenKriterienFromKriterienRepository()
|
||||
{
|
||||
$kriterien = new \HermannTelser\Zuladungsliste\Domain\Model\Kriterien();
|
||||
$kriterienRepository = $this->getMock('HermannTelser\Zuladungsliste\Domain\Repository\KriterienRepository', array('remove'), array(), '', FALSE);
|
||||
$kriterienRepository->expects($this->once())->method('remove')->with($kriterien);
|
||||
$this->inject($this->subject, 'kriterienRepository', $kriterienRepository);
|
||||
$this->subject->deleteAction($kriterien);
|
||||
}
|
||||
|
||||
/**
|
||||
* action list
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function listAction()
|
||||
{
|
||||
// $architektens = $this->architektenRepository->findAll();
|
||||
// $this->view->assign('architektens', $architektens);
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function Action()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Zuladungsliste\Controller;
|
||||
|
||||
use In2code\Femanager\Controller\EditController as FemanagerEditController;
|
||||
|
||||
class EditController extends FemanagerEditController
|
||||
{
|
||||
/**
|
||||
* action update
|
||||
*
|
||||
* @param HermannTelser\Zuladungsliste\Domain\Model\User $user
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("In2code\Femanager\Domain\Validator\ServersideValidator", param="user")
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("In2code\Femanager\Domain\Validator\PasswordValidator", param="user")
|
||||
*/
|
||||
public function updateAction($user): void
|
||||
{
|
||||
parent::updateAction($user);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
namespace HermannTelser\Zuladungsliste\Controller;
|
||||
|
||||
/***************************************************************
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Hermann Telser <hermann.telser@gmail.com>, Hermann Telser
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
/**
|
||||
* Test case for class HermannTelser\Zuladungsliste\Controller\WettbewerbeController.
|
||||
*
|
||||
* @author Hermann Telser <hermann.telser@gmail.com>
|
||||
*/
|
||||
class ExtrasperrungController extends \TYPO3\CMS\Core\Tests\UnitTestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var \HermannTelser\Zuladungsliste\Controller\WettbewerbeController
|
||||
*/
|
||||
protected $subject = NULL;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->subject = $this->getMock('HermannTelser\Zuladungsliste\Controller\WettbewerbeController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
unset($this->subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function listActionFetchesAllWettbewerbesFromRepositoryAndAssignsThemToView()
|
||||
{
|
||||
$allWettbewerbes = $this->getMock('TYPO3\CMS\Extbase\Persistence\ObjectStorage', array(), array(), '', FALSE);
|
||||
$wettbewerbeRepository = $this->getMock('HermannTelser\Zuladungsliste\Domain\Repository\WettbewerbeRepository', array('findAll'), array(), '', FALSE);
|
||||
$wettbewerbeRepository->expects($this->once())->method('findAll')->will($this->returnValue($allWettbewerbes));
|
||||
$this->inject($this->subject, 'wettbewerbeRepository', $wettbewerbeRepository);
|
||||
$view = $this->getMock('TYPO3\CMS\Extbase\Mvc\View\ViewInterface');
|
||||
$view->expects($this->once())->method('assign')->with('wettbewerbes', $allWettbewerbes);
|
||||
$this->inject($this->subject, 'view', $view);
|
||||
$this->subject->listAction();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function showActionAssignsTheGivenWettbewerbeToView()
|
||||
{
|
||||
$wettbewerbe = new \HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe();
|
||||
$view = $this->getMock('TYPO3\CMS\Extbase\Mvc\View\ViewInterface');
|
||||
$this->inject($this->subject, 'view', $view);
|
||||
$view->expects($this->once())->method('assign')->with('wettbewerbe', $wettbewerbe);
|
||||
$this->subject->showAction($wettbewerbe);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function createActionAddsTheGivenWettbewerbeToWettbewerbeRepository()
|
||||
{
|
||||
$wettbewerbe = new \HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe();
|
||||
$wettbewerbeRepository = $this->getMock('HermannTelser\Zuladungsliste\Domain\Repository\WettbewerbeRepository', array('add'), array(), '', FALSE);
|
||||
$wettbewerbeRepository->expects($this->once())->method('add')->with($wettbewerbe);
|
||||
$this->inject($this->subject, 'wettbewerbeRepository', $wettbewerbeRepository);
|
||||
$this->subject->createAction($wettbewerbe);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function editActionAssignsTheGivenWettbewerbeToView()
|
||||
{
|
||||
$wettbewerbe = new \HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe();
|
||||
$view = $this->getMock('TYPO3\CMS\Extbase\Mvc\View\ViewInterface');
|
||||
$this->inject($this->subject, 'view', $view);
|
||||
$view->expects($this->once())->method('assign')->with('wettbewerbe', $wettbewerbe);
|
||||
$this->subject->editAction($wettbewerbe);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function updateActionUpdatesTheGivenWettbewerbeInWettbewerbeRepository()
|
||||
{
|
||||
$wettbewerbe = new \HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe();
|
||||
$wettbewerbeRepository = $this->getMock('HermannTelser\Zuladungsliste\Domain\Repository\WettbewerbeRepository', array('update'), array(), '', FALSE);
|
||||
$wettbewerbeRepository->expects($this->once())->method('update')->with($wettbewerbe);
|
||||
$this->inject($this->subject, 'wettbewerbeRepository', $wettbewerbeRepository);
|
||||
$this->subject->updateAction($wettbewerbe);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function deleteActionRemovesTheGivenWettbewerbeFromWettbewerbeRepository()
|
||||
{
|
||||
$wettbewerbe = new \HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe();
|
||||
$wettbewerbeRepository = $this->getMock('HermannTelser\Zuladungsliste\Domain\Repository\WettbewerbeRepository', array('remove'), array(), '', FALSE);
|
||||
$wettbewerbeRepository->expects($this->once())->method('remove')->with($wettbewerbe);
|
||||
$this->inject($this->subject, 'wettbewerbeRepository', $wettbewerbeRepository);
|
||||
$this->subject->deleteAction($wettbewerbe);
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function Action()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
namespace HermannTelser\Zuladungsliste\Controller;
|
||||
|
||||
/***************************************************************
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Hermann Telser <hermann.telser@gmail.com>, Hermann Telser
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
/**
|
||||
* Test case for class HermannTelser\Zuladungsliste\Controller\ExtrasperrungController.
|
||||
*
|
||||
* @author Hermann Telser <hermann.telser@gmail.com>
|
||||
*/
|
||||
class KriterienController extends \TYPO3\CMS\Core\Tests\UnitTestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var \HermannTelser\Zuladungsliste\Controller\ExtrasperrungController
|
||||
*/
|
||||
protected $subject = NULL;
|
||||
|
||||
/**
|
||||
* kriterienRepository
|
||||
*
|
||||
* @var \HermannTelser\Zuladungsliste\Domain\Repository\KriterienRepository
|
||||
* @TYPO3CMSExtbaseAnnotationInject
|
||||
*/
|
||||
protected $kriterienRepository = NULL;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->subject = $this->getMock('HermannTelser\Zuladungsliste\Controller\ExtrasperrungController', array('redirect', 'forward', 'addFlashMessage'), array(), '', FALSE);
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
unset($this->subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* action list
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function listAction()
|
||||
{
|
||||
$kriteriens = $this->kriterienRepository->findAll();
|
||||
$this->view->assign('kriteriens', $kriteriens);
|
||||
}
|
||||
|
||||
/**
|
||||
* action show
|
||||
*
|
||||
* @param \HermannTelser\Zuladungsliste\Domain\Model\Kriterien $kriterien
|
||||
* @return void
|
||||
*/
|
||||
public function showAction(\HermannTelser\Zuladungsliste\Domain\Model\Kriterien $kriterien)
|
||||
{
|
||||
$this->view->assign('kriterien', $kriterien);
|
||||
}
|
||||
|
||||
/**
|
||||
* action new
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* action create
|
||||
*
|
||||
* @param \HermannTelser\Zuladungsliste\Domain\Model\Kriterien $newKriterien
|
||||
* @return void
|
||||
*/
|
||||
public function createAction(\HermannTelser\Zuladungsliste\Domain\Model\Kriterien $newKriterien)
|
||||
{
|
||||
$this->addFlashMessage('The object was created. Please be aware that this action is publicly accessible unless you implement an access check. See http://wiki.typo3.org/T3Doc/Extension_Builder/Using_the_Extension_Builder#1._Model_the_domain', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
|
||||
$this->kriterienRepository->add($newKriterien);
|
||||
$this->redirect('list');
|
||||
}
|
||||
|
||||
/**
|
||||
* action edit
|
||||
*
|
||||
* @param \HermannTelser\Zuladungsliste\Domain\Model\Kriterien $kriterien
|
||||
* @TYPO3CMS\Extbase\Annotation\IgnoreValidation $kriterien
|
||||
* @return void
|
||||
*/
|
||||
public function editAction(\HermannTelser\Zuladungsliste\Domain\Model\Kriterien $kriterien)
|
||||
{
|
||||
$this->view->assign('kriterien', $kriterien);
|
||||
}
|
||||
|
||||
/**
|
||||
* action update
|
||||
*
|
||||
* @param \HermannTelser\Zuladungsliste\Domain\Model\Kriterien $kriterien
|
||||
* @return void
|
||||
*/
|
||||
public function updateAction(\HermannTelser\Zuladungsliste\Domain\Model\Kriterien $kriterien)
|
||||
{
|
||||
$this->addFlashMessage('The object was updated. Please be aware that this action is publicly accessible unless you implement an access check. See http://wiki.typo3.org/T3Doc/Extension_Builder/Using_the_Extension_Builder#1._Model_the_domain', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
|
||||
$this->kriterienRepository->update($kriterien);
|
||||
$this->redirect('list');
|
||||
}
|
||||
|
||||
/**
|
||||
* action delete
|
||||
*
|
||||
* @param \HermannTelser\Zuladungsliste\Domain\Model\Kriterien $kriterien
|
||||
* @return void
|
||||
*/
|
||||
public function deleteAction(\HermannTelser\Zuladungsliste\Domain\Model\Kriterien $kriterien)
|
||||
{
|
||||
$this->addFlashMessage('The object was deleted. Please be aware that this action is publicly accessible unless you implement an access check. See http://wiki.typo3.org/T3Doc/Extension_Builder/Using_the_Extension_Builder#1._Model_the_domain', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
|
||||
$this->kriterienRepository->remove($kriterien);
|
||||
$this->redirect('list');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace HermannTelser\Zuladungsliste\Controller;
|
||||
|
||||
use In2code\Femanager\Controller\NewController as FemanagerNewController;
|
||||
|
||||
class NewController extends FemanagerNewController
|
||||
{
|
||||
/**
|
||||
* action create
|
||||
*
|
||||
* @param HermannTelser\Zuladungsliste\Domain\Model\User $user
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("In2code\Femanager\Domain\Validator\ServersideValidator", param="user")
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("In2code\Femanager\Domain\Validator\PasswordValidator", param="user")
|
||||
*/
|
||||
public function createAction($user): void
|
||||
{
|
||||
parent::createAction($user);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
<?php
|
||||
namespace HermannTelser\Zuladungsliste\Controller;
|
||||
|
||||
/***************************************************************
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Hermann Telser <hermann.telser@gmail.com>, Hermann Telser
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
use TYPO3\CMS\Extbase\Annotation\Inject;
|
||||
|
||||
/**
|
||||
* Test case for class \HermannTelser\Zuladungsliste\Domain\Model\Architekten.
|
||||
*
|
||||
* @copyright Copyright belongs to the respective authors
|
||||
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
|
||||
* @author Hermann Telser <hermann.telser@gmail.com>
|
||||
*/
|
||||
class WettbewerbeController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
|
||||
{
|
||||
|
||||
/**
|
||||
* @var \HermannTelser\Zuladungsliste\Domain\Model\Architekten
|
||||
*/
|
||||
protected $subject = NULL;
|
||||
|
||||
/**
|
||||
* wettbewerbeRepository
|
||||
*
|
||||
* @var \HermannTelser\Zuladungsliste\Domain\Repository\WettbewerbeRepository
|
||||
* @TYPO3\CMS\Extbase\Annotation\Inject
|
||||
*/
|
||||
protected $wettbewerbeRepository = NULL;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->subject = new \HermannTelser\Zuladungsliste\Domain\Model\Architekten();
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
unset($this->subject);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function getInlisteReturnsInitialValueForBool()
|
||||
{
|
||||
$this->assertSame(FALSE, $this->subject->getInliste());
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function setInlisteForBoolSetsInliste()
|
||||
{
|
||||
$this->subject->setInliste(TRUE);
|
||||
$this->assertAttributeEquals(TRUE, 'inliste', $this->subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function getVereidigungReturnsInitialValueForDateTime()
|
||||
{
|
||||
$this->assertEquals(NULL, $this->subject->getVereidigung());
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function setVereidigungForDateTimeSetsVereidigung()
|
||||
{
|
||||
$dateTimeFixture = new \DateTime();
|
||||
$this->subject->setVereidigung($dateTimeFixture);
|
||||
$this->assertAttributeEquals($dateTimeFixture, 'vereidigung', $this->subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function getGeburtsdatumReturnsInitialValueForDateTime()
|
||||
{
|
||||
$this->assertEquals(NULL, $this->subject->getGeburtsdatum());
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function setGeburtsdatumForDateTimeSetsGeburtsdatum()
|
||||
{
|
||||
$dateTimeFixture = new \DateTime();
|
||||
$this->subject->setGeburtsdatum($dateTimeFixture);
|
||||
$this->assertAttributeEquals($dateTimeFixture, 'geburtsdatum', $this->subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function getfrauenfoerderpunktReturnsInitialValueForBool()
|
||||
{
|
||||
$this->assertSame(FALSE, $this->subject->getfrauenfoerderpunkt());
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function setfrauenfoerderpunktForBoolSetsfrauenfoerderpunkt()
|
||||
{
|
||||
$this->subject->setfrauenfoerderpunkt(TRUE);
|
||||
$this->assertAttributeEquals(TRUE, 'frauenfoerderpunkt', $this->subject);
|
||||
}
|
||||
|
||||
/**
|
||||
* action list
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function listAction()
|
||||
{
|
||||
$wettbewerbes = $this->wettbewerbeRepository->findAll();
|
||||
$this->view->assign('wettbewerbes', $wettbewerbes);
|
||||
}
|
||||
|
||||
/**
|
||||
* action show
|
||||
*
|
||||
* @param \HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe $wettbewerbe
|
||||
* @return void
|
||||
*/
|
||||
public function showAction(\HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe $wettbewerbe)
|
||||
{
|
||||
$this->view->assign('wettbewerbe', $wettbewerbe);
|
||||
}
|
||||
|
||||
/**
|
||||
* action new
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function newAction()
|
||||
{
|
||||
//// top.TYPO3.Backend.NavigationContainer.PageTree.select(38);
|
||||
echo '<script>
|
||||
if (top && top.TYPO3.Backend.NavigationContainer.PageTree) {
|
||||
top.TYPO3.ModuleMenu.App.showModule("web_list");
|
||||
}
|
||||
window.open("http://'.$_SERVER["SERVER_NAME"].'/index.php?id=34","_blank");
|
||||
</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* action create
|
||||
*
|
||||
* @param \HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe $newWettbewerbe
|
||||
* @return void
|
||||
*/
|
||||
public function createAction(\HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe $newWettbewerbe)
|
||||
{
|
||||
$this->addFlashMessage('The object was created. Please be aware that this action is publicly accessible unless you implement an access check. See http://wiki.typo3.org/T3Doc/Extension_Builder/Using_the_Extension_Builder#1._Model_the_domain', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
|
||||
$this->wettbewerbeRepository->add($newWettbewerbe);
|
||||
$this->redirect('list');
|
||||
}
|
||||
|
||||
/**
|
||||
* action edit
|
||||
*
|
||||
* @param \HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe $wettbewerbe
|
||||
* @TYPO3\CMS\Extbase\Annotation\IgnoreValidation $wettbewerbe
|
||||
* @return void
|
||||
*/
|
||||
public function editAction(\HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe $wettbewerbe)
|
||||
{
|
||||
$this->view->assign('wettbewerbe', $wettbewerbe);
|
||||
}
|
||||
|
||||
/**
|
||||
* action update
|
||||
*
|
||||
* @param \HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe $wettbewerbe
|
||||
* @return void
|
||||
*/
|
||||
public function updateAction(\HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe $wettbewerbe)
|
||||
{
|
||||
$this->addFlashMessage('The object was updated. Please be aware that this action is publicly accessible unless you implement an access check. See http://wiki.typo3.org/T3Doc/Extension_Builder/Using_the_Extension_Builder#1._Model_the_domain', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
|
||||
$this->wettbewerbeRepository->update($wettbewerbe);
|
||||
$this->redirect('list');
|
||||
}
|
||||
|
||||
/**
|
||||
* action delete
|
||||
*
|
||||
* @param \HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe $wettbewerbe
|
||||
* @return void
|
||||
*/
|
||||
public function deleteAction(\HermannTelser\Zuladungsliste\Domain\Model\Wettbewerbe $wettbewerbe)
|
||||
{
|
||||
$this->addFlashMessage('The object was deleted. Please be aware that this action is publicly accessible unless you implement an access check. See http://wiki.typo3.org/T3Doc/Extension_Builder/Using_the_Extension_Builder#1._Model_the_domain', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
|
||||
$this->wettbewerbeRepository->remove($wettbewerbe);
|
||||
$this->redirect('list');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user