Пример #1
0
 public function testCountIsEmpty()
 {
     $this->assertEquals(2, $this->properties->count());
     $this->assertFalse($this->properties->isEmpty());
     $this->properties->clear();
     $this->assertEquals(0, $this->properties->count());
     $this->assertTrue($this->properties->isEmpty());
 }
 private function writeOnWorkSheet(Map $groupedValues, ExcelOutputFile $spreadSheet, array $years, $index = 0)
 {
     if (!$groupedValues->isEmpty()) {
         parent::titles($years);
         parent::addValuesToARow($groupedValues, $years);
         $spreadSheet->setNewDataToExcel($this->dataToExcel);
         $nameGroup = $groupedValues->get(0)->offsetGet(0)->getSubgroupName();
         $spreadSheet->buildSpreadSheet($nameGroup, $index);
     }
 }
Пример #3
0
 /** @dataProvider provides_valid_collection */
 public function test_isEmpty($collection, array $array)
 {
     $c = new Map($collection);
     $this->assertSame(0 === count($array), $c->isEmpty());
 }