public function testGerandoUrlJobComCredenciais()
 {
     $credentialsMock = $this->getMock('Jamal\\JenkinsArduino\\Jenkins\\Credentials');
     $credentialsMock->user = '******';
     $credentialsMock->token = 'password';
     $jobConfig = new JobConfig('My-First-Job', 'jenkins.local', 8181);
     $jobConfig->setCredentials($credentialsMock);
     $this->assertEquals('http://*****:*****@jenkins.local:8181/job/My-First-Job/lastBuild/api/json', $jobConfig->toUrl());
 }
Exemplo n.º 2
0
 public function testGerandoUrlJobComCredenciais()
 {
     $jobConfig = new JobConfig('My-First-Job', 'jenkins.local', 8181);
     $jobConfig->setCredentials(new Credentials());
     $this->assertEquals('http://*****:*****@jenkins.local:8181/job/My-First-Job/lastBuild/api/json', $jobConfig->toUrl());
 }