コード例 #1
0
ファイル: PhpArrayTest.php プロジェクト: DAICAR/ZfcDatagrid
 public function setUp()
 {
     parent::setUp();
     $source = new PhpArray($this->data);
     $source->setColumns([$this->colVolumne, $this->colEdition]);
     $this->source = $source;
 }
コード例 #2
0
 public function setUp()
 {
     parent::setUp();
     $collection = new ArrayCollection();
     foreach ($this->data as $row) {
         $collection->add(new Category());
     }
     $this->collection = $collection;
     $source = new Doctrine2Collection($this->collection);
     $source->setColumns([$this->colVolumne, $this->colEdition]);
     $this->source = $source;
 }
コード例 #3
0
ファイル: ZendSelectTest.php プロジェクト: DAICAR/ZfcDatagrid
 /**
  * https://github.com/zendframework/zf2/blob/master/tests/ZendTest/Db/Adapter/AdapterTest.php#L43
  * https://github.com/zendframework/zf2/blob/master/tests/ZendTest/Db/Sql/SqlTest.php#L26
  */
 public function setUp()
 {
     parent::setUp();
     $this->mockDriver = $this->getMock('Zend\\Db\\Adapter\\Driver\\DriverInterface');
     $this->mockConnection = $this->getMock('Zend\\Db\\Adapter\\Driver\\ConnectionInterface');
     $this->mockDriver->expects($this->any())->method('checkEnvironment')->will($this->returnValue(true));
     $this->mockDriver->expects($this->any())->method('getConnection')->will($this->returnValue($this->mockConnection));
     $this->mockPlatform = $this->getMock('Zend\\Db\\Adapter\\Platform\\PlatformInterface');
     $this->mockPlatform->expects($this->any())->method('getIdentifierSeparator')->will($this->returnValue('.'));
     $this->mockStatement = $this->getMock('Zend\\Db\\Adapter\\Driver\\StatementInterface');
     $this->mockDriver->expects($this->any())->method('createStatement')->will($this->returnValue($this->mockStatement));
     $this->adapter = new Adapter($this->mockDriver, $this->mockPlatform);
     $this->sql = new Sql($this->adapter, 'foo');
     $select = new Select();
     $this->source = new ZendSelect($select);
     $this->source->setAdapter($this->sql);
     $this->source->setColumns([$this->colVolumne, $this->colEdition]);
 }
コード例 #4
0
 public function setUp()
 {
     $this->em = $this->_getTestEntityManager();
     parent::setUp();
 }