1 | <?php |
||
5 | class ShapeFileTest extends PHPUnit_Framework_TestCase |
||
|
|||
6 | { |
||
7 | /** |
||
8 | * Tests loading of a file |
||
9 | * |
||
10 | * @param string $filename Name of file |
||
11 | * @param integer $records Expected number of records |
||
12 | * @param integer $parts Expected number of parts in first record |
||
13 | * |
||
14 | * @return void |
||
15 | * |
||
16 | * @dataProvider provideFiles |
||
17 | */ |
||
18 | public function testLoad($filename, $records, $parts) |
||
28 | |||
29 | /** |
||
30 | * Data provider for file loading tests. |
||
31 | * |
||
32 | * @return array |
||
33 | */ |
||
34 | public function provideFiles() |
||
35 | { |
||
36 | return array( |
||
37 | array('data/capitals.*', 652, null), |
||
38 | array('data/mexico.*', 32, 3), |
||
39 | array('data/Czech_Republic_AL2.*', 1, 1), |
||
40 | array('data/w001n05f.*', 1, 1), |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Test error handling in loader |
||
46 | * |
||
47 | * @param string $filename name to load |
||
48 | * |
||
49 | * @return void |
||
50 | * |
||
51 | * @dataProvider provideErrorFiles |
||
52 | */ |
||
53 | public function testLoadError($filename) |
||
59 | |||
60 | /** |
||
61 | * Data provider for file loading error tests. |
||
62 | * |
||
63 | * @return array |
||
64 | */ |
||
65 | public function provideErrorFiles() |
||
66 | { |
||
67 | return array( |
||
68 | array('data/no-dbf.*'), |
||
69 | array('data/no-shp.*'), |
||
70 | array('data/invalid-dbf.*'), |
||
71 | array('data/missing.*'), |
||
72 | ); |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * Tests creating file |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | public function testCreate() |
||
119 | } |
||
120 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.