addValue('name', 'Not current') ->addValue('version', \CRM_Utils_System::version()) ->execute(); Domain::update(FALSE) ->addValue('name', 'Currently the current domain') ->addWhere('is_active', '=', TRUE) ->execute(); $getCurrent = Domain::get(FALSE) ->addWhere('is_active', '=', TRUE) ->execute()->single(); $this->assertEquals('Currently the current domain', $getCurrent['name']); $getAll = Domain::get(FALSE) ->addSelect('*', 'is_active') ->execute()->indexBy('name'); $this->assertTrue($getAll['Currently the current domain']['is_active']); $this->assertFalse($getAll['Not current']['is_active']); } }