Add build modification settings, fix exception handling to log to file

This commit is contained in:
Dane Everitt 2017-07-23 19:57:43 -05:00
parent ace70a3599
commit f842aae3d3
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
15 changed files with 427 additions and 50 deletions

View file

@ -24,6 +24,7 @@
namespace Tests\Unit\Services\Servers;
use Illuminate\Log\Writer;
use Mockery as m;
use phpmock\phpunit\PHPMock;
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
@ -98,6 +99,11 @@ class CreationServiceTest extends TestCase
*/
protected $uuid;
/**
* @var \Illuminate\Log\Writer
*/
protected $writer;
/**
* Setup tests.
*/
@ -115,6 +121,7 @@ class CreationServiceTest extends TestCase
$this->usernameService = m::mock(UsernameGenerationService::class);
$this->validatorService = m::mock(VariableValidatorService::class);
$this->uuid = m::mock('overload:Ramsey\Uuid\Uuid');
$this->writer = m::mock(Writer::class);
$this->getFunctionMock('\\Pterodactyl\\Services\\Servers', 'bin2hex')
->expects($this->any())->willReturn('randomstring');
@ -131,7 +138,8 @@ class CreationServiceTest extends TestCase
$this->serverVariableRepository,
$this->userRepository,
$this->usernameService,
$this->validatorService
$this->validatorService,
$this->writer
);
}