updated phpunit tests, add a resource->getResource() method