Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Nov 15, 2017
1 parent 4e26329 commit cc6380f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/unit/test_radlinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,17 @@ public function testLaunch()

$_SESSION = array("user"=>"admin", "password"=>"admin");
$_GET = array("op"=>"launch", "id"=>$rowid, "parameters"=>"1", "wn"=>"2");

$im = $this->getMockBuilder(IMRest::class)
->setMethods(['CreateInfrastructure'])
->getMock();
$im->method('CreateInfrastructure')
->willReturn("infid");

$GLOBALS['mock_im'] = $im;
include('../../radlinfo.php');
$this->assertEquals(array('Location: error.php?msg=Error%3A+Connect+error%3A+Connection+refused+%28111%29'),xdebug_get_headers());
unset($GLOBALS['mock_im']);
$this->assertEquals(array('Location: list.php'),xdebug_get_headers());
}

/**
Expand Down

0 comments on commit cc6380f

Please sign in to comment.