/** * @covers Paradox\Client::createGraph * @covers Paradox\Client::deleteGraph */ public function testCreateAndDeleteGraph() { $this->client->createGraph('mynewtestgraph'); //Check that the graph exists $graphInfo = $this->client->getGraphInfo('mynewtestgraph'); $this->assertInternalType('array', $graphInfo, 'The graph info should be an array'); $this->assertNotEmpty($graphInfo, 'The graph info should not be empty'); //Delete the graph $this->client->deleteGraph('mynewtestgraph'); try { $graphInfo = $this->client->getGraphInfo('mynewtestgraph'); } catch (\Exception $e) { $this->assertInstanceOf('Paradox\\exceptions\\GraphManagerException', $e, 'Exception thrown was not a Paradox\\exceptions\\GraphManagerException'); return; } $this->fail("Tried to get info on a graph that does not exist, but no exception was thrown"); }