public function FppServicesTest::testFppRetrieve in Fieldable Panels Panes (FPP) 7
Tests FPP resource Retrieve.
File
- tests/
fpp.services.test, line 177 - Tests the services resource Fieldable Panels Pane methods and actions.
Class
- FppServicesTest
- Test the services resource Fieldable Panels Pane methods and actions.
Code
public function testFppRetrieve() {
$privileged_user = $this
->drupalCreateUser(array(
'administer services',
'administer fieldable panels panes',
));
$this
->drupalLogin($privileged_user);
// Verify FPP entity is found.
$fpp = $this
->createFpp();
$responseArray = $this
->servicesGet($this->endpoint->path . '/fieldable_panels_panes/' . $fpp->fpid);
$this
->assertTrue($fpp->title == $responseArray['body']->title, 'Successfully received fieldable panels pane info', 'fppResource: Retrieve');
// Verify FPP entity not found.
unset($fpp);
$responseArray = $this
->servicesGet($this->endpoint->path . '/fieldable-panels-pane/99');
$this
->assertTrue($responseArray['code'] == '404', 'Successfully was rejected to non existent fieldable panels pane', 'fppResource: Retrieve');
}