You are here

function ServicesResourceTaxonomyTests::getNodeNids in Services 7.3

Same name and namespace in other branches
  1. 6.3 tests/functional/ServicesResourceTaxonomyTests.test \ServicesResourceTaxonomyTests::getNodeNids()

Helper. Get array of nids from nodes array.

1 call to ServicesResourceTaxonomyTests::getNodeNids()
ServicesResourceTaxonomyTests::testTermSelectNodes in tests/functional/ServicesResourceTaxonomyTests.test
Test taxonomy term selectNodes method.

File

tests/functional/ServicesResourceTaxonomyTests.test, line 663
Call the endpoint tests when no authentication is being used.

Class

ServicesResourceTaxonomyTests
Taxonomy resource test class.

Code

function getNodeNids($nodes) {
  $nodes = (array) $nodes;
  $return = array();
  foreach ($nodes as $node) {
    if (isset($node->nid)) {
      $return[] = $node->nid;
    }
  }
  return $return;
}