getFeature() public method

Returns a specific organization feature value
public getFeature ( string $feature ) : mixed | null
$feature string Feature to check
return mixed | null Feature value, or null if not found
コード例 #1
0
 public function testGetFeature()
 {
     $data = ["change_management" => true, "multidev" => false];
     $this->request->expects($this->once())->method('request')->with('organizations/123/features', [])->willReturn(['data' => $data]);
     $organization = new Organization((object) ['id' => '123']);
     $organization->setRequest($this->request);
     $this->assertTrue($organization->getFeature('change_management'));
     $this->assertFalse($organization->getFeature('multidev'));
     $this->assertNull($organization->getFeature('invalid'));
 }