8000 Add dummy test files · grok-php/laravel@69a82b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 69a82b6

Browse files
committed
Add dummy test files
1 parent 411d5d8 commit 69a82b6

File tree

5 files changed

+95
-0
lines changed

5 files changed

+95
-0
lines changed

tests/Feature/GrokFacadeTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace Tests\Feature;
4+
5+
use Tests\TestCase;
6+
use GrokPHP\Laravel\Facades\GrokAI;
7+
use GrokPHP\Client\Config\ChatOptions;
8+
use GrokPHP\Client\Enums\Model;
9+
use Illuminate\Support\Facades\Http;
10+
11+
class GrokFacadeTest extends TestCase
12+
{
13+
public function test_it_sends_a_chat_request_and_receives_a_response()
14+
{
15+
// soon ...
16+
}
17+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Tests\Feature;
4+
5+
use Tests\TestCase;
6+
use GrokPHP\Client\Clients\GrokClient;
7+
8+
class GrokServiceProviderTest extends TestCase
9+
{
10+
public function test_it_registers_the_GrokClient_in_the_service_container()
11+
{
12+
// soon ...
13+
}
14+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace Tests\Feature;
4+
5+
use Tests\TestCase;
6+
use Illuminate\Support\Facades\Artisan;
7+
use Illuminate\Support\Facades\File;
8+
9+
class InstallGrokCommandTest extends TestCase
10+
{
11+
protected function setUp(): void
12+
{
13+
parent::setUp();
14+
15+
// soon ...
16+
}
17+
18+
public function test_it_runs_the_install_command_successfully()
19+
{
20+
// soon ...
21+
}
22+
}

tests/TestCase.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace Tests;
4+
5+
use Orchestra\Testbench\TestCase as BaseTestCase;
6+
use GrokPHP\Laravel\Providers\GrokServiceProvider;
7+
use GrokPHP\Laravel\Facades\GrokAI;
8+
9+
abstract class TestCase extends BaseTestCase
10+
{
11+
protected function getPackageProviders($app): array
12+
{
13+
return [GrokServiceProvider::class];
14+
}
15+
16+
protected function getPackageAliases($app): array
17+
{
18+
return [
19+
'GrokAI' => GrokAI::class,
20+
];
21+
}
22+
23+
protected function defineEnvironment($app)
24+
{
25+
$app['config']->set('grok.api_key', 'test-api-key');
26+
}
27+
}

tests/Unit/GrokConfigTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Tests\Unit;
4+
5+
use PHPUnit\Framework\TestCase;
6+
use GrokPHP\Client\Config\GrokConfig;
7+
use GrokPHP\Client\Enums\DefaultConfig;
8+
9+
class GrokConfigTest extends TestCase
10+
{
11+
public function test_it_uses_default_values_when_not_overridden()
12+
{
13+
// soon ...
14+
}
15+
}

0 commit comments

Comments
 (0)
0