PHP Class spec\Newscoop\NewscoopBundle\Controller\TopicsControllerSpec

Inheritance: extends PhpSpec\ObjectBehavior
Exibir arquivo Open project: sourcefabric/newscoop

Public Methods

Method Description
it_is_initializable ( )
it_is_of_type_container_aware ( )
its_addAction_should_add_a_new_topic_when_form_is_valid ( $request, $formFactory, $form, $entityManager, $topicService, $repository, $topic, $csrfTokenManagerAdapter, $cacheService )
its_addAction_should_not_add_a_new_topic_when_form_is_invalid ( Symfony\Component\Form\FormErrorIterator $formIterator, FormError $formError, $request, $formFactory, $form, $entityManager, $topicRepository, $repository, $topic, $csrfTokenManagerAdapter )
its_addAction_should_return_403_when_invalid_csrf_token ( $request, $form, $repository, $topic, $csrfTokenManagerAdapter )
its_attachTopicAction_should_attach_topics ( $request, $topic, $topicService, $queryBuilder, $user, $entityManager, $repository, $articleTopicrepository, $query, $article, $cacheService )
its_attachTopicAction_should_return_403_status_code_when_no_permissions ( $request, $user )
its_attachTopicAction_should_return_404_status_code_when_no_article ( $request, $queryBuilder, $user, $entityManager, $repository, $query )
its_deleteAction_should_delete_single_topic ( $request, $topic, $repository, $cacheService )
its_deleteAction_should_return_404_when_topic_not_found ( $request, $repository )
its_detachTopicAction_should_detach_topic_from_the_article ( $request, $topicService, $topic, $query, $user, $topicRepository, $entityManager, $repository, $article, $cacheService )
its_detachTopicAction_should_return_403_status_code_when_no_permissions ( $request, $user )
its_detachTopicAction_should_return_404_status_code_when_no_article ( $request, $user, $entityManager, $repository )
its_detachTopicAction_should_return_404_status_code_when_no_topic ( $request, $query, $user, $topicRepository, $entityManager, $repository, $article )
its_editAction_should_edit_topic ( $request, $repository, $topic, $csrfTokenManagerAdapter, $form, $cacheService )
its_editAction_should_return_403_when_invalid_csrf_token ( $request, $csrfTokenManagerAdapter )
its_editAction_should_return_404_when_topic_not_found ( $request, $repository, $csrfTokenManagerAdapter )
its_isAttachedAction_should_return_404_status_code_when_topic_doesnt_exist ( $request, $repository )
its_moveAction_should_move_child_topic_to_first_position_in_current_subtree ( $request, $topicService, $entityManager, $topicRepository, $parameterBag, $repository, $topic, $cacheService )
its_moveAction_should_move_child_topic_to_last_position_in_current_subtree ( $request, $topicService, $entityManager, $topicRepository, $parameterBag, $repository, $topic, $cacheService )
its_moveAction_should_move_child_topic_to_middle_position_in_current_subtree ( $request, $topicService, $entityManager, $topicRepository, $parameterBag, $repository, $topic, $cacheService )
its_moveAction_should_return_404_status_code_when_topic_to_be_moved_not_found ( $request )
its_treeAction_should_render_the_tree_of_topics ( $topicRepository, $articleTopicrepository, $request, $query2, $entityManager, $query, $topicService )
let ( Symfony\Component\DependencyInjection\Container $container, Translator $translator, Symfony\Component\HttpFoundation\Session\Session $session, TopicRepository $topicRepository, Doctrine\ORM\EntityRepository $repository, EntityManager $entityManager, Request $request, FormFactory $formFactory, FormBuilder $formBuilder, Form $form, Symfony\Component\Form\FormView $formView, Topic $topic, Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfTokenManagerAdapter $csrfTokenManagerAdapter, Doctrine\ORM\AbstractQuery $query, Doctrine\ORM\AbstractQuery $query2, Symfony\Component\HttpFoundation\ParameterBag $parameterBag, ArticleTopicRepository $articleTopicrepository, UserService $userService, User $user, TopicService $topicService, Article $article, Doctrine\ORM\QueryBuilder $queryBuilder, CacheService $cacheService, Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher $dispatcher )

Method Details

it_is_initializable() public method

public it_is_initializable ( )

it_is_of_type_container_aware() public method

its_addAction_should_add_a_new_topic_when_form_is_valid() public method

public its_addAction_should_add_a_new_topic_when_form_is_valid ( $request, $formFactory, $form, $entityManager, $topicService, $repository, $topic, $csrfTokenManagerAdapter, $cacheService )

its_addAction_should_not_add_a_new_topic_when_form_is_invalid() public method

public its_addAction_should_not_add_a_new_topic_when_form_is_invalid ( Symfony\Component\Form\FormErrorIterator $formIterator, FormError $formError, $request, $formFactory, $form, $entityManager, $topicRepository, $repository, $topic, $csrfTokenManagerAdapter )
$formIterator Symfony\Component\Form\FormErrorIterator
$formError Symfony\Component\Form\FormError

its_addAction_should_return_403_when_invalid_csrf_token() public method

public its_addAction_should_return_403_when_invalid_csrf_token ( $request, $form, $repository, $topic, $csrfTokenManagerAdapter )

its_attachTopicAction_should_attach_topics() public method

public its_attachTopicAction_should_attach_topics ( $request, $topic, $topicService, $queryBuilder, $user, $entityManager, $repository, $articleTopicrepository, $query, $article, $cacheService )

its_attachTopicAction_should_return_403_status_code_when_no_permissions() public method

its_attachTopicAction_should_return_404_status_code_when_no_article() public method

public its_attachTopicAction_should_return_404_status_code_when_no_article ( $request, $queryBuilder, $user, $entityManager, $repository, $query )

its_deleteAction_should_delete_single_topic() public method

public its_deleteAction_should_delete_single_topic ( $request, $topic, $repository, $cacheService )

its_deleteAction_should_return_404_when_topic_not_found() public method

its_detachTopicAction_should_detach_topic_from_the_article() public method

public its_detachTopicAction_should_detach_topic_from_the_article ( $request, $topicService, $topic, $query, $user, $topicRepository, $entityManager, $repository, $article, $cacheService )

its_detachTopicAction_should_return_403_status_code_when_no_permissions() public method

its_detachTopicAction_should_return_404_status_code_when_no_article() public method

public its_detachTopicAction_should_return_404_status_code_when_no_article ( $request, $user, $entityManager, $repository )

its_detachTopicAction_should_return_404_status_code_when_no_topic() public method

public its_detachTopicAction_should_return_404_status_code_when_no_topic ( $request, $query, $user, $topicRepository, $entityManager, $repository, $article )

its_editAction_should_edit_topic() public method

public its_editAction_should_edit_topic ( $request, $repository, $topic, $csrfTokenManagerAdapter, $form, $cacheService )

its_editAction_should_return_403_when_invalid_csrf_token() public method

public its_editAction_should_return_403_when_invalid_csrf_token ( $request, $csrfTokenManagerAdapter )

its_editAction_should_return_404_when_topic_not_found() public method

public its_editAction_should_return_404_when_topic_not_found ( $request, $repository, $csrfTokenManagerAdapter )

its_isAttachedAction_should_return_404_status_code_when_topic_doesnt_exist() public method

its_moveAction_should_move_child_topic_to_first_position_in_current_subtree() public method

public its_moveAction_should_move_child_topic_to_first_position_in_current_subtree ( $request, $topicService, $entityManager, $topicRepository, $parameterBag, $repository, $topic, $cacheService )

its_moveAction_should_move_child_topic_to_last_position_in_current_subtree() public method

public its_moveAction_should_move_child_topic_to_last_position_in_current_subtree ( $request, $topicService, $entityManager, $topicRepository, $parameterBag, $repository, $topic, $cacheService )

its_moveAction_should_move_child_topic_to_middle_position_in_current_subtree() public method

public its_moveAction_should_move_child_topic_to_middle_position_in_current_subtree ( $request, $topicService, $entityManager, $topicRepository, $parameterBag, $repository, $topic, $cacheService )

its_moveAction_should_return_404_status_code_when_topic_to_be_moved_not_found() public method

its_treeAction_should_render_the_tree_of_topics() public method

public its_treeAction_should_render_the_tree_of_topics ( $topicRepository, $articleTopicrepository, $request, $query2, $entityManager, $query, $topicService )

let() public method

public let ( Symfony\Component\DependencyInjection\Container $container, Translator $translator, Symfony\Component\HttpFoundation\Session\Session $session, TopicRepository $topicRepository, Doctrine\ORM\EntityRepository $repository, EntityManager $entityManager, Request $request, FormFactory $formFactory, FormBuilder $formBuilder, Form $form, Symfony\Component\Form\FormView $formView, Topic $topic, Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfTokenManagerAdapter $csrfTokenManagerAdapter, Doctrine\ORM\AbstractQuery $query, Doctrine\ORM\AbstractQuery $query2, Symfony\Component\HttpFoundation\ParameterBag $parameterBag, ArticleTopicRepository $articleTopicrepository, UserService $userService, User $user, TopicService $topicService, Article $article, Doctrine\ORM\QueryBuilder $queryBuilder, CacheService $cacheService, Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher $dispatcher )
$container Symfony\Component\DependencyInjection\Container
$translator Symfony\Component\Translation\Translator
$session Symfony\Component\HttpFoundation\Session\Session
$topicRepository Newscoop\NewscoopBundle\Entity\Repository\TopicRepository
$repository Doctrine\ORM\EntityRepository
$entityManager Doctrine\ORM\EntityManager
$request Symfony\Component\HttpFoundation\Request
$formFactory Symfony\Component\Form\FormFactory
$formBuilder Symfony\Component\Form\FormBuilder
$form Symfony\Component\Form\Form
$formView Symfony\Component\Form\FormView
$topic Newscoop\NewscoopBundle\Entity\Topic
$csrfTokenManagerAdapter Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfTokenManagerAdapter
$query Doctrine\ORM\AbstractQuery
$query2 Doctrine\ORM\AbstractQuery
$parameterBag Symfony\Component\HttpFoundation\ParameterBag
$articleTopicrepository Newscoop\Entity\Repository\ArticleTopicRepository
$userService Newscoop\Services\UserService
$user Newscoop\Entity\User
$topicService Newscoop\NewscoopBundle\Services\TopicService
$article Newscoop\Entity\Article
$queryBuilder Doctrine\ORM\QueryBuilder
$cacheService Newscoop\Services\CacheService
$dispatcher Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher