1 node.test | public NodeLayoutPreviewTestCase::lastNid() |
Returns the NID of the most recently created node of our content type.
File
- core/
modules/ node/ tests/ node.test, line 853 - Tests for node.module.
Class
- NodeLayoutPreviewTestCase
- Tests that the correct layout is used for node previews.
Code
public function lastNid() {
return db_query('
SELECT nid FROM {node}
WHERE type = :type
ORDER BY nid DESC
LIMIT 1
', array(':type' => $this->content_type->type))
->fetchField();
}