public/phpmyadmin/vendor/phpmyadmin/shapefile/tests/ShapeFileTest.php
/**
     * Tests loading of a file.
     *
     * @param string $filename Name of file
     * @param int    $records  Expected number of records
     * @param int    $parts    Expected number of parts in first record
     *
     *
     * @dataProvider provideFiles
     */
Tests loading of a file.
@param string $filename Name of file
@param int    $records  Expected number of records
@param int    $parts    Expected number of parts in first record

@dataProvider provideFiles
Tests loading of a file . @param string $filename Name of file @param int $records Expected number of records @param int $parts Expected number of parts in first record @dataProvider provideFiles
public function testLoad($filename, $records, $parts)
    {
        $shp = new ShapeFile(1);
        $shp->loadFromFile($filename);
        $this->assertEquals('', $shp->lastError);
        $this->assertEquals($records, count($shp->records));
        if (!is_null($parts)) {
            $this->assertEquals($parts, count($shp->records[0]->SHPData['parts']));
        }
    }
public function testLoad ( $ filename , $ records , $ parts ) { $ shp = new ShapeFile ( 1 ) ; $ shp -> loadFromFile ( $ filename ) ; $ this -> assertEquals ( '' , $ shp -> lastError ) ; $ this -> assertEquals ( $ records , count ( $ shp -> records ) ) ; if ( ! is_null ( $ parts ) ) { $ this -> assertEquals ( $ parts , count ( $ shp -> records [ 0 ] -> SHPData [ 'parts' ] ) ) ; } }
Tests loading of a file.
Tests loading of a file .