gordonbanderson /
weboftalent-adverts
| 1 | <?php |
||
| 2 | |||
| 3 | class AdvertSiteTreeExtensionTest extends SapphireTest |
||
|
0 ignored issues
–
show
|
|||
| 4 | { |
||
| 5 | public static $fixture_file = 'adverts/tests/adverts.yml'; |
||
| 6 | |||
| 7 | /* |
||
| 8 | Test child of a parent with a set advert category ID |
||
| 9 | */ |
||
| 10 | public function testCalculateAdvertCategoryIDChild() { |
||
| 11 | $sectionPage = $this->objFromFixture('Page', 'Section'); |
||
| 12 | $page = $this->objFromFixture('Page', 'SectionChild'); |
||
| 13 | $categoryID = $page->CalculateAdvertCategoryID(); |
||
| 14 | $this->assertEquals($sectionPage->AdvertCategoryID, $categoryID); |
||
| 15 | } |
||
| 16 | |||
| 17 | /* |
||
| 18 | Test grandchild of a grandparent with a set advert category ID |
||
| 19 | */ |
||
| 20 | public function testCalculateAdvertCategoryIDGrandChild() { |
||
| 21 | $sectionPage = $this->objFromFixture('Page', 'Section'); |
||
| 22 | $page = $this->objFromFixture('Page', 'SectionGrandChild'); |
||
| 23 | $categoryID = $page->CalculateAdvertCategoryID(); |
||
| 24 | $this->assertEquals($sectionPage->AdvertCategoryID, $categoryID); |
||
| 25 | } |
||
| 26 | } |
||
| 27 |
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.