/** * @return int */ protected function calculateSize() { $size = count($this->sourceAvailableDb->toOptionArray()); return $size > 6 ? 6 : $size; }
public function testToOptionArray() { $expectedOptionArray = [['label' => 'db_title_1', 'value' => 'db_code_1'], ['label' => 'db_title_2', 'value' => 'db_code_2'], ['label' => 'db_title_3', 'value' => 'db_code_3']]; $this->assertEquals($expectedOptionArray, $this->availableDb->toOptionArray()); }