| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class CKANRegistryPageControllerFunctionalTest extends FunctionalTest |
||
| 10 | { |
||
| 11 | protected static $fixture_file = 'CKANRegistryPageControllerTest.yml'; |
||
| 12 | |||
| 13 | protected static $use_draft_site = true; |
||
| 14 | |||
| 15 | protected function setUp() |
||
| 16 | { |
||
| 17 | // Mock the field populator, in case an action we perform in a unit test tries to contact the mock API. |
||
| 18 | // Done before parent::setUp() so write hooks don't run during fixture population. |
||
| 19 | $populator = $this->createMock(ResourcePopulatorInterface::class); |
||
| 20 | Injector::inst()->registerService($populator, ResourcePopulatorInterface::class); |
||
| 21 | |||
| 22 | parent::setUp(); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function testGetSchemaFromPageUrl() |
||
| 26 | { |
||
| 27 | $response = $this->get('animal-centers/schema'); |
||
| 28 | |||
| 29 | $this->assertSame(200, $response->getStatusCode()); |
||
| 30 | $this->assertJson($response->getBody()); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testGetSchemaFromPageSubUrl() |
||
| 39 | } |
||
| 40 | } |
||
| 41 |