We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
db_is_mysql
1 parent 5ce4093 commit 33c7b8dCopy full SHA for 33c7b8d
tests/db/DbIsMysqlTest.php
@@ -0,0 +1,24 @@
1
+<?php
2
+
3
+use Mockery as m;
4
5
+class DbIsMysqlTest extends TestCase
6
+{
7
+ /** @test */
8
+ public function it_returns_true_if_laravel_database_default_connection_is_mysql()
9
+ {
10
+ $mock = m::mock('alias:Illuminate\Support\Facades\DB');
11
+ $mock->shouldReceive('getDefaultConnection')->withNoArgs()->once()->andReturn('mysql');
12
13
+ $this->assertTrue(db_is_mysql());
14
+ }
15
16
17
+ public function it_returns_false_if_laravel_database_default_connection_is_not_mysql()
18
19
20
+ $mock->shouldReceive('getDefaultConnection')->withNoArgs()->once()->andReturn('sqlite');
21
22
+ $this->assertFalse(db_is_mysql());
23
24
+}
0 commit comments