laravel-websockets/tests/ClientProviders/AppTest.php

35 lines
759 B
PHP
Raw Normal View History

2018-11-28 22:59:58 +00:00
<?php
namespace BeyondCode\LaravelWebSockets\Tests\ClientProviders;
2018-12-01 12:57:02 +00:00
use BeyondCode\LaravelWebSockets\Apps\App;
2018-11-28 22:59:58 +00:00
use BeyondCode\LaravelWebSockets\Tests\TestCase;
2018-12-04 21:22:33 +00:00
use BeyondCode\LaravelWebSockets\Exceptions\InvalidApp;
2018-11-28 22:59:58 +00:00
2018-12-01 13:12:15 +00:00
class AppTest extends TestCase
2018-11-28 22:59:58 +00:00
{
/** @test */
public function it_can_create_a_client()
{
new App(1, 'appKey', 'appSecret');
2018-11-28 22:59:58 +00:00
$this->markTestAsPassed();
}
/** @test */
public function it_will_not_accept_an_empty_appKey()
{
2018-12-01 12:58:25 +00:00
$this->expectException(InvalidApp::class);
2018-11-28 22:59:58 +00:00
new App(1, '', 'appSecret');
2018-11-28 22:59:58 +00:00
}
/** @test */
public function it_will_not_accept_an_empty_appSecret()
{
2018-12-01 12:58:25 +00:00
$this->expectException(InvalidApp::class);
2018-11-28 22:59:58 +00:00
new App(1, 'appKey', '');
2018-11-28 22:59:58 +00:00
}
2018-12-04 21:22:33 +00:00
}