1 | <?php |
||
8 | class ContentTests extends PHPUnit_Framework_TestCase |
||
|
|||
9 | { |
||
10 | /** |
||
11 | * If the given summary and description is valid a Content model with the given summary and description should be |
||
12 | * returned |
||
13 | * |
||
14 | * @test |
||
15 | * @dataProvider getValidContentData |
||
16 | * |
||
17 | * @param string $summary |
||
18 | * @param string $description |
||
19 | */ |
||
20 | public function getContent_ValidSummaryAndDescriptionGiven_ContentWithSummaryAndDescriptionIsReturned( |
||
32 | |||
33 | /** |
||
34 | * If the given summary is invalid a ContentException should be thrown |
||
35 | * |
||
36 | * @test |
||
37 | * @dataProvider getContentWithInvalidSummary |
||
38 | * @expectedException Wambo\Catalog\Error\ContentException |
||
39 | * @expectedExceptionMessageRegExp /The summary text should not be (shorter|longer) than \d+ characters/ |
||
40 | * |
||
41 | * @param string $summary |
||
42 | * @param string $description |
||
43 | */ |
||
44 | public function getContent_InvalidSummary_ContentExceptionIsThrown($summary, $description) |
||
49 | |||
50 | /** |
||
51 | * Get a list of valid content data for testing |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | public static function getValidContentData() |
||
69 | |||
70 | /** |
||
71 | * Get a list of valid content data for testing |
||
72 | * |
||
73 | * @return array |
||
74 | */ |
||
75 | public static function getContentWithInvalidSummary() |
||
91 | } |
||
92 |
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.