public function testGetIdxName() { $table = 'table'; $calculatedTableName = self::TABLE_PREFIX . 'table'; $fields = ['field']; $indexType = 'index_type'; $expectedIdxName = 'idxName'; $this->connection->expects($this->once())->method('getIndexName')->with($calculatedTableName, $fields, $indexType)->will($this->returnValue($expectedIdxName)); $this->connectionFactory->expects($this->once())->method('create')->will($this->returnValue($this->connection)); $this->assertEquals('idxName', $this->resource->getIdxName($table, $fields, $indexType)); }