示例#1
0
 public function testListInNamespace()
 {
     $service = $this->loginToRealService();
     $entities = $service->getSavedSearches()->items(array('namespace' => Splunk_Namespace::createSystem()));
     $this->assertCount(0, $entities, 'Expected no saved searches in the system namespace.');
     return $entities;
 }
示例#2
0
 public function testGetMissingEntityReferenceInNamespace()
 {
     $service = $this->loginToRealService();
     $savedSearch = $service->getSavedSearches()->getReference(self::SAVED_SEARCH_NAME, Splunk_Namespace::createSystem());
     try {
         $this->touch($savedSearch);
         $this->assertTrue(FALSE, 'Expected Splunk_HttpException to be thrown.');
     } catch (Splunk_HttpException $e) {
         $this->assertEquals(404, $e->getResponse()->status);
     }
 }
示例#3
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testCreateSystemWithTooManyArguments()
 {
     Splunk_Namespace::createSystem('theapp');
 }