/**
  * setUp
  *
  */
 public function setUp()
 {
     parent::setUp();
     $this->dataTable = new QueryBuilderDataTable();
     $this->dataTable->setContainer($this->container);
     Phake::when($this->container)->get('data_tables.service')->thenReturn($this->service);
 }
 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     $this->request = Phake::mock('Symfony\\Component\\HttpFoundation\\Request');
     $this->parameterBag = Phake::mock('Symfony\\Component\\HttpFoundation\\ParameterBag');
     $this->model = new RequestParameterBag();
 }
 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     $this->responseParameters = Phake::mock('Brown298\\DataTablesBundle\\Model\\ResponseParameterBag');
     $this->requestParameters = Phake::mock('Brown298\\DataTablesBundle\\Model\\RequestParameterBag');
     $this->logger = Phake::mock('Psr\\Log\\LoggerInterface');
     $this->service = new ArrayProcessor($this->requestParameters, $this->logger);
 }
 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     $this->table = Phake::Mock('Brown298\\DataTablesBundle\\MetaData\\Table');
     $this->container = Phake::Mock('\\Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $this->em = Phake::Mock('\\Doctrine\\ORM\\EntityManager');
     $this->tableBuilder = new tableBuilder();
     $this->tableBuilder->setContainer($this->container);
     $this->tableBuilder->setEm($this->em);
 }
 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     $this->queryBuilder = Phake::mock('Doctrine\\ORM\\QueryBuilder');
     $this->query = Phake::mock('Doctrine\\ORM\\AbstractQuery');
     $this->requestParameters = Phake::mock('Brown298\\DataTablesBundle\\Model\\RequestParameterBag');
     $this->logger = Phake::mock('Psr\\Log\\LoggerInterface');
     $this->em = Phake::mock('Doctrine\\ORM\\EntityManager');
     $this->arrayCollection = Phake::mock('Doctrine\\Common\\Collections\\ArrayCollection');
     $this->service = new QueryBuilderProcessor($this->queryBuilder, $this->requestParameters);
 }
예제 #6
0
 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     $this->container = Phake::mock('\\Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $this->em = Phake::mock('\\Doctrine\\ORM\\EntityManager');
     $this->reader = Phake::mock('\\Doctrine\\Common\\Annotations\\AnnotationReader');
     $this->kernel = Phake::mock('\\Symfony\\Component\\HttpKernel\\Kernel');
     $this->bundle = Phake::mock('\\Symfony\\Component\\HttpKernel\\Bundle\\Bundle');
     $this->parser = Phake::mock('\\Symfony\\Component\\Yaml\\Parser');
     Phake::when($this->container)->get('kernel')->thenReturn($this->kernel);
     $this->tableManager = new TableManager($this->container, $this->reader, array(), array(), $this->em, '');
 }
 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     $this->container = Phake::mock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $this->request = Phake::mock('Symfony\\Component\\HttpFoundation\\Request');
     $this->dataTablesService = Phake::mock('Brown298\\DataTablesBundle\\Service\\ServerProcessService');
     $this->logger = Phake::mock('\\Psr\\Log\\LoggerInterface');
     $this->column = Phake::mock('\\Brown298\\DataTablesBundle\\MetaData\\Column');
     $this->format = Phake::mock('\\Brown298\\DataTablesBundle\\MetaData\\Column');
     $this->renderer = Phake::mock('\\Symfony\\Component\\Templating\\EngineInterface');
     Phake::when($this->container)->get('logger')->thenReturn($this->logger);
     $this->dataTable = new EmptyDataTable();
 }
 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     $this->service = new ServerProcessService();
     $this->request = Phake::mock('\\Symfony\\Component\\HttpFoundation\\Request');
     $this->queryBuilder = Phake::mock('Doctrine\\ORM\\QueryBuilder');
     $this->query = Phake::mock('Doctrine\\ORM\\AbstractQuery');
     $this->requestParameters = Phake::mock('Brown298\\DataTablesBundle\\Model\\RequestParameterBag');
     $this->logger = Phake::mock('Psr\\Log\\LoggerInterface');
     $this->processor = Phake::mock('Brown298\\DataTablesBundle\\Service\\Processor\\ProcessorInterface');
     $this->repository = Phake::mock('\\Doctrine\\ORM\\EntityRepository');
     $this->em = Phake::mock('Doctrine\\ORM\\EntityManager');
     $this->arrayCollection = Phake::mock('Doctrine\\Common\\Collections\\ArrayCollection');
     Phake::when($this->repository)->createQueryBuilder(Phake::anyParameters())->thenReturn($this->queryBuilder);
     $this->service->setRequest($this->request);
 }
 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     $this->responseParameters = Phake::mock('Brown298\\DataTablesBundle\\Model\\ResponseParameterBag');
     $this->requestParameters = Phake::mock('Brown298\\DataTablesBundle\\Model\\RequestParameterBag');
     $this->queryBuilder = Phake::mock('Doctrine\\ORM\\QueryBuilder');
     $this->query = Phake::mock('Doctrine\\ORM\\AbstractQuery');
     $this->logger = Phake::mock('Psr\\Log\\LoggerInterface');
     $this->repository = Phake::mock('\\Doctrine\\ORM\\EntityRepository');
     $this->em = Phake::mock('Doctrine\\ORM\\EntityManager');
     $this->arrayCollection = Phake::mock('Doctrine\\Common\\Collections\\ArrayCollection');
     Phake::when($this->repository)->createQueryBuilder(Phake::anyParameters())->thenReturn($this->queryBuilder);
     Phake::when($this->queryBuilder)->getQuery(Phake::anyParameters())->thenReturn($this->query);
     Phake::when($this->queryBuilder)->andWhere(Phake::anyParameters())->thenReturn($this->queryBuilder);
     Phake::when($this->queryBuilder)->select(Phake::anyParameters())->thenReturn($this->queryBuilder);
     $this->service = new RepositoryProcessor($this->repository, $this->requestParameters, $this->logger);
 }
 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     $this->model = new ResponseParameterBag();
 }
예제 #11
0
 /**
  * setUp
  *
  */
 public function setUp()
 {
     parent::setUp();
     $this->service = new DataTables();
 }
 /**
  * setUp
  */
 public function setUp()
 {
     parent::setUp();
     $this->extension = new Brown298DataTablesExtension();
 }