laravel-websockets/tests/Statistics/Rules/AppIdTest.php

19 lines
477 B
PHP
Raw Normal View History

2018-12-03 12:33:00 +00:00
<?php
namespace BeyondCode\LaravelWebSockets\Tests\Statistics\Rules;
2018-12-04 21:22:33 +00:00
use BeyondCode\LaravelWebSockets\Statistics\Rules\AppId;
2020-03-04 09:58:39 +00:00
use BeyondCode\LaravelWebSockets\Tests\TestCase;
2018-12-03 12:33:00 +00:00
class AppIdTest extends TestCase
{
/** @test */
public function it_can_validate_an_app_id()
{
$rule = new AppId();
$this->assertTrue($rule->passes('app_id', config('websockets.apps.0.id')));
$this->assertFalse($rule->passes('app_id', 'invalid-app-id'));
}
2018-12-04 21:22:33 +00:00
}