From 1cc7eaa29fd7b1ed31817e405f2ddd259b024d56 Mon Sep 17 00:00:00 2001 From: "James (DPC)" <69664712+JamesDPC@users.noreply.github.com> Date: Tue, 12 Nov 2024 16:34:48 +1100 Subject: [PATCH] Update: 1 October 2024 data --- data/yml/governance-arrangements/20241001.yml | 139 ++++++++++++++++++ tests/v20241001Test.php | 39 +++++ 2 files changed, 178 insertions(+) create mode 100644 data/yml/governance-arrangements/20241001.yml create mode 100644 tests/v20241001Test.php diff --git a/data/yml/governance-arrangements/20241001.yml b/data/yml/governance-arrangements/20241001.yml new file mode 100644 index 0000000..38d0a79 --- /dev/null +++ b/data/yml/governance-arrangements/20241001.yml @@ -0,0 +1,139 @@ +--- +name: 'nswgov-clusters-agencies' +version: 20241001 +supersedes: 20240807 +created: '2024-10-01' +fromdate: '2024-10-01' +title: 'Governance Arrangements Chart from 1 October 2024' +author: 'The Cabinet Office NSW' +source: 'https://www.nsw.gov.au/departments-and-agencies/the-cabinet-office/resources/governance-arrangements-chart' +description: > + Please note: This chart contains information about Ministers, State-owned + corporations established under Schedule 5 to the State Owned Corporations Act + 1989 (NSW), and those NSW Government agencies that are established under + Schedule 1 to the Government Sector Employment Act 2013 (NSW). There are a + range of other NSW statutory bodies and statutory positions that are + established under other Acts. Information on which portfolio statutory bodies + and positions holders are part of can be obtained by consulting the + Allocation of the Administration of Acts and the legislation that establishes + the statutory body or officer (available at www.legislation.nsw.gov.au). The + NSW legislation website is the primary source of information about the legal + structure of the NSW Government. +clusters: + 'Premier and Cabinet': + departments: + - 'Premier''s Department' + - 'The Cabinet Office' + executive_agencies: + - 'Natural Resources Commission Staff Agency' + - 'Parliamentary Counsel''s Office' + separate_agencies: + - 'Ombudsman''s Office' + - 'New South Wales Electoral Commission Staff Agency' + - 'Office of the Law Enforcement Conduct Commission' + - 'Office of the Inspector of the Law Enforcement Conduct Commission' + - 'Independent Pricing and Regulatory Tribunal Staff Agency' + - 'Office of the Inspector of the Independent Commission Against Corruption' + 'Education': + departments: + - 'Department of Education' + other_services: + - 'Teaching Service' + separate_agencies: + - 'TAFE Commission (Senior Executives) Staff Agency' + - 'NSW Education Standards Authority Staff Agency' + 'Climate Change, Energy and the Environment': + departments: + - 'Department of Climate Change, Energy, the Environment and Water' + executive_agencies: + - 'Energy Corporation of New South Wales Staff Agency' + separate_agencies: + - 'Environment Protection Authority Staff Agency' + corporations: + - 'Essential Energy' + - 'Water NSW' + - 'Hunter Water Corporation' + - 'Sydney Water Corporation' + 'Creative Industries, Tourism, Hospitality and Sport': + departments: + - 'Department of Creative Industries, Tourism, Hospitality and Sport' + executive_agencies: + - 'Art Gallery of NSW Trust Staff Agency' + - 'Australian Museum Trust Staff Agency' + - 'Library Council of NSW Staff Agency' + - 'Trustees of the Museum of Applied Arts and Sciences Staff Agency' + - 'Sydney Opera House Trust Staff Agency' + - 'Museums of History NSW and State Records Authority NSW Staff Agency' + - 'Institute of Sport Staff Agency' + - 'Office of Sport' + - 'Venues NSW Staff Agency' + separate_agencies: + - 'Office of the Greyhound Welfare and Integrity Commission' + - 'Independent Liquor and Gaming Authority Staff Agency' + - 'NSW Independent Casino Commission Staff Agency' + 'Treasury': + departments: + - 'Treasury' + executive_agencies: + - 'Infrastructure NSW Staff Agency' + - 'SAS Trustee Corporation Staff Agency' + 'Planning': + departments: + - 'Department of Planning, Housing and Infrastructure' + executive_agencies: + - 'NSW Reconstruction Authority Staff Agency' + separate_agencies: + - 'Office of the Independent Planning Commission' + corporations: + - 'Landcom' + 'Health': + departments: + - 'Ministry of Health' + executive_agencies: + - 'Health Professional Councils Authority Office' + - 'Mental Health Commission Staff Agency' + other_services: + - 'NSW Health Service' + separate_agencies: + - 'Health Care Complaints Commission Staff Agency' + 'Transport': + departments: + - 'Department of Transport' + other_services: + - 'Transport Service' + corporations: + - 'Newcastle Port Corporation (known as the Port Authority of New South Wales)' + - 'Transport Asset Holding Entity of New South Wales' + 'Primary Industries and Regional Development': + departments: + - 'Department of Primary Industries and Regional Development' + executive_agencies: + - 'Local Land Services Staff Agency' + corporations: + - 'Forestry Corporation' + 'Communities and Justice': + departments: + - 'Department of Communities and Justice' + executive_agencies: + - 'Corrective Services NSW' + - 'Crown Solicitor''s Office' + - 'Fire and Rescue NSW' + - 'Office of the NSW Rural Fire Service' + - 'Office of the NSW State Emergency Service' + - 'Multicultural NSW Staff Agency' + other_services: + - 'NSW Police Force' + separate_agencies: + - 'Office of the Director of Public Prosecutions' + - 'Legal Aid Commission Staff Agency' + - 'NSW Crime Commission Staff Agency' + - 'Office of the Children''s Guardian' + - 'Office of the Ageing and Disability Commissioner' + 'Customer Service': + departments: + - 'Department of Customer Service' + executive_agencies: + - 'Service NSW' + separate_agencies: + - 'Information and Privacy Commission' + - 'Office of the Independent Review Officer' diff --git a/tests/v20241001Test.php b/tests/v20241001Test.php new file mode 100644 index 0000000..b01927e --- /dev/null +++ b/tests/v20241001Test.php @@ -0,0 +1,39 @@ +serviceInstance->getData(); + $clusterData = $this->serviceInstance->getCluster('Premier and Cabinet'); + $this->assertEquals(2, count($clusterData['departments'])); + } + + public function testClusterFromDepartment() { + $data = $this->serviceInstance->getData(); + $clusterName = $this->serviceInstance->getClusterFromDepartment('Premier\'s Department'); + $this->assertEquals('Premier and Cabinet', $clusterName); + } + + public function testGetClusterFromAgency() { + $data = $this->serviceInstance->getData(); + $cluster = $this->serviceInstance->getClusterFromAgency('Premier\'s Department'); + $this->assertEquals('Premier and Cabinet', $cluster ); + } +}