| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 40 | public function testDump() |
||
| 41 | { |
||
| 42 | $this->console->shouldReceive('run') |
||
| 43 | ->with(m::on(function ($parameter) { |
||
| 44 | $pattern = "/pg_dump --inserts --schema='public' 'testDatabase' > 'testfile.sql'/"; |
||
| 45 | |||
| 46 | return preg_match($pattern, $parameter) == true; |
||
| 47 | }), null, [ |
||
| 48 | 'PGHOST' => 'localhost', |
||
| 49 | 'PGUSER' => 'testUser', |
||
| 50 | 'PGPASSWORD' => 'password', |
||
| 51 | 'PGPORT' => '5432' |
||
| 52 | ]) |
||
| 53 | ->once() |
||
| 54 | ->andReturn(true); |
||
| 55 | |||
| 56 | $this->assertTrue( |
||
| 57 | $this->database->dump('testfile.sql') |
||
| 58 | ); |
||
| 59 | } |
||
| 60 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.