Files
chill-bundles/src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php
2021-11-23 14:08:50 +01:00

33 lines
700 B
PHP

<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\ActivityBundle\Test;
use Chill\ActivityBundle\Entity\Activity;
use Chill\MainBundle\Entity\Scope;
use Chill\PersonBundle\Entity\Person;
/**
* Prepare entities useful in tests.
*/
trait PrepareActivityTrait
{
/**
* Return an activity with a scope and a person inside.
*
* @return Activity
*/
public function prepareActivity(Scope $scope, Person $person)
{
return (new Activity())
->setScope($scope)
->setPerson($person);
}
}