-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathPluginShowMobileVersionTest.php
More file actions
44 lines (35 loc) · 1.11 KB
/
PluginShowMobileVersionTest.php
File metadata and controls
44 lines (35 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
namespace Tests\Feature;
use App\Features\ShowPlugins;
use App\Models\Plugin;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laravel\Pennant\Feature;
use Tests\TestCase;
class PluginShowMobileVersionTest extends TestCase
{
use RefreshDatabase;
protected function setUp(): void
{
parent::setUp();
Feature::define(ShowPlugins::class, true);
}
public function test_plugin_show_displays_mobile_min_version(): void
{
$plugin = Plugin::factory()->approved()->create([
'mobile_min_version' => '^3.0.0',
]);
$this->get(route('plugins.show', $plugin->routeParams()))
->assertStatus(200)
->assertSee('NativePHP Mobile')
->assertSee('^3.0.0');
}
public function test_plugin_show_displays_dash_when_mobile_min_version_is_null(): void
{
$plugin = Plugin::factory()->approved()->create([
'mobile_min_version' => null,
]);
$this->get(route('plugins.show', $plugin->routeParams()))
->assertStatus(200)
->assertSee('NativePHP Mobile');
}
}